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/CREATE.spec.ts
2023-07-05 15:22:33 -04:00

31 lines
757 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../../test-utils';
import CREATE from './CREATE';
describe('TDIGEST.CREATE', () => {
describe('transformArguments', () => {
it('without options', () => {
assert.deepEqual(
CREATE.transformArguments('key'),
['TDIGEST.CREATE', 'key']
);
});
it('with COMPRESSION', () => {
assert.deepEqual(
CREATE.transformArguments('key', {
COMPRESSION: 100
}),
['TDIGEST.CREATE', 'key', 'COMPRESSION', '100']
);
});
});
testUtils.testWithClient('client.tDigest.create', async client => {
assert.equal(
await client.tDigest.create('key'),
'OK'
);
}, GLOBAL.SERVERS.OPEN);
});