You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
22 lines
570 B
TypeScript
22 lines
570 B
TypeScript
import { strict as assert } from 'assert';
|
|
import testUtils, { GLOBAL } from '../../test-utils';
|
|
import COUNT from './COUNT';
|
|
|
|
describe('TOPK.COUNT', () => {
|
|
it('transformArguments', () => {
|
|
assert.deepEqual(
|
|
COUNT.transformArguments('key', 'item'),
|
|
['TOPK.COUNT', 'key', 'item']
|
|
);
|
|
});
|
|
|
|
testUtils.testWithClient('client.topK.count', async client => {
|
|
const [, reply] = await Promise.all([
|
|
client.topK.reserve('key', 3),
|
|
client.topK.count('key', 'item')
|
|
]);
|
|
|
|
assert.deepEqual(reply, [0]);
|
|
}, GLOBAL.SERVERS.OPEN);
|
|
});
|