1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00
Files
node-redis/packages/bloom/lib/commands/t-digest/CDF.spec.ts
2023-07-05 15:22:33 -04:00

22 lines
568 B
TypeScript

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