Debian Codegraph @

packages/bloom/lib/commands/count-min-sketch/QUERY.spec.ts

raw
1 import { strict as assert } from 'assert';
2 import testUtils, { GLOBAL } from '../../test-utils';
3 import { transformArguments } from './QUERY';
4
5 describe('CMS QUERY', () => {
6 it('transformArguments', () => {
7 assert.deepEqual(
8 transformArguments('key', 'item'),
9 ['CMS.QUERY', 'key', 'item']
10 );
11 });
12
13 testUtils.testWithClient('client.cms.query', async client => {
14 await client.cms.initByDim('key', 1000, 5);
15
16 assert.deepEqual(
17 await client.cms.query('key', 'item'),
18 [0]
19 );
20
21 }, GLOBAL.SERVERS.OPEN);
22 });