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
579 B
TypeScript

import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils';
import RANK from './RANK';
describe('TDIGEST.RANK', () => {
it('transformArguments', () => {
assert.deepEqual(
RANK.transformArguments('key', [1, 2]),
['TDIGEST.RANK', 'key', '1', '2']
);
});
testUtils.testWithClient('client.tDigest.rank', async client => {
const [, reply] = await Promise.all([
client.tDigest.create('key'),
client.tDigest.rank('key', [1])
]);
assert.deepEqual(reply, [-2]);
}, GLOBAL.SERVERS.OPEN);
});