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

25 lines
626 B
TypeScript

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