Debian Codegraph @

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

raw
1 import { strict as assert } from 'assert';
2 import testUtils, { GLOBAL } from '../../test-utils';
3 import { transformArguments } from './INITBYPROB';
4
5 describe('CMS INITBYPROB', () => {
6 it('transformArguments', () => {
7 assert.deepEqual(
8 transformArguments('key', 0.001, 0.01),
9 ['CMS.INITBYPROB', 'key', '0.001', '0.01']
10 );
11 });
12
13 testUtils.testWithClient('client.cms.initByProb', async client => {
14 assert.equal(
15 await client.cms.initByProb('key', 0.001, 0.01),
16 'OK'
17 );
18 }, GLOBAL.SERVERS.OPEN);
19 });