Debian Codegraph @

packages/search/lib/commands/DICTDUMP.spec.ts

raw
1 import { strict as assert } from 'assert';
2 import testUtils, { GLOBAL } from '../test-utils';
3 import { transformArguments } from './DICTDUMP';
4
5 describe('DICTDUMP', () => {
6 it('transformArguments', () => {
7 assert.deepEqual(
8 transformArguments('dictionary'),
9 ['FT.DICTDUMP', 'dictionary']
10 );
11 });
12
13 testUtils.testWithClient('client.ft.dictDump', async client => {
14 await client.ft.dictAdd('dictionary', 'string')
15
16 assert.deepEqual(
17 await client.ft.dictDump('dictionary'),
18 ['string']
19 );
20 }, GLOBAL.SERVERS.OPEN);
21 });