1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
2023-09-18 15:03:07 -04:00

22 lines
566 B
TypeScript

import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils';
import ADD from './ADD';
describe('TOPK.ADD', () => {
it('transformArguments', () => {
assert.deepEqual(
ADD.transformArguments('key', 'item'),
['TOPK.ADD', 'key', 'item']
);
});
testUtils.testWithClient('client.topK.add', async client => {
const [, reply] = await Promise.all([
client.topK.reserve('topK', 3),
client.topK.add('topK', 'item')
]);
assert.deepEqual(reply, [null]);
}, GLOBAL.SERVERS.OPEN);
});