Debian Codegraph @

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

raw
1 import { strict as assert } from 'assert';
2 import testUtils, { GLOBAL } from '../test-utils';
3 import { transformArguments } from './DICTDEL';
4
5 describe('DICTDEL', () => {
6 describe('transformArguments', () => {
7 it('string', () => {
8 assert.deepEqual(
9 transformArguments('dictionary', 'term'),
10 ['FT.DICTDEL', 'dictionary', 'term']
11 );
12 });
13
14 it('Array', () => {
15 assert.deepEqual(
16 transformArguments('dictionary', ['1', '2']),
17 ['FT.DICTDEL', 'dictionary', '1', '2']
18 );
19 });
20 });
21
22 testUtils.testWithClient('client.ft.dictDel', async client => {
23 assert.equal(
24 await client.ft.dictDel('dictionary', 'term'),
25 0
26 );
27 }, GLOBAL.SERVERS.OPEN);
28 });