You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
* wip * close #2216 - add support for TDIGEST.MERGESTORE and make compression optional on TDIGEST.CREATE * fix some tdigest commands, use bloom edge docker * fix index.ts * 2.4-RC2 (v2.4.1) * fix some commands and tests * clean code
22 lines
667 B
TypeScript
22 lines
667 B
TypeScript
import { strict as assert } from 'assert';
|
|
import testUtils, { GLOBAL } from '../../test-utils';
|
|
import { transformArguments } from './BYREVRANK';
|
|
|
|
describe('TDIGEST.BYREVRANK', () => {
|
|
it('transformArguments', () => {
|
|
assert.deepEqual(
|
|
transformArguments('key', [1, 2]),
|
|
['TDIGEST.BYREVRANK', 'key', '1', '2']
|
|
);
|
|
});
|
|
|
|
testUtils.testWithClient('client.tDigest.byRevRank', async client => {
|
|
const [ , reply ] = await Promise.all([
|
|
client.tDigest.create('key'),
|
|
client.tDigest.byRevRank('key', [1])
|
|
]);
|
|
|
|
assert.deepEqual(reply, [NaN]);
|
|
}, GLOBAL.SERVERS.OPEN);
|
|
});
|