Debian Codegraph @

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

raw
1 import { strict as assert } from 'assert';
2 import testUtils, { GLOBAL } from '../test-utils';
3 import { SchemaFieldTypes } from '.';
4 import { transformArguments } from './TAGVALS';
5
6 describe('TAGVALS', () => {
7 it('transformArguments', () => {
8 assert.deepEqual(
9 transformArguments('index', '@field'),
10 ['FT.TAGVALS', 'index', '@field']
11 );
12 });
13
14 testUtils.testWithClient('client.ft.tagVals', async client => {
15 await client.ft.create('index', {
16 field: SchemaFieldTypes.TAG
17 });
18
19 assert.deepEqual(
20 await client.ft.tagVals('index', 'field'),
21 []
22 );
23 }, GLOBAL.SERVERS.OPEN);
24 });