Skip to content

Commit 29239bf

Browse files
committed
Add test for SEARCH_NOCONTENT#transformReply
1 parent 08cb648 commit 29239bf

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { strict as assert } from 'assert';
22
import { SchemaFieldTypes } from '.';
33
import testUtils, { GLOBAL } from '../test-utils';
4-
import { transformArguments } from './SEARCH_NOCONTENT';
4+
import { transformArguments, transformReply } from './SEARCH_NOCONTENT';
55

66
describe('SEARCH_NOCONTENT', () => {
77
describe('transformArguments', () => {
@@ -13,7 +13,16 @@ describe('SEARCH_NOCONTENT', () => {
1313
});
1414
});
1515

16-
describe('client.ft.searchNoContent', () => {
16+
describe('transformReply', () => {
17+
it('returns total and keys', () => {
18+
assert.deepEqual(transformReply([3, '1', '2', '3']), {
19+
total: 3,
20+
documents: ['1', '2', '3']
21+
})
22+
});
23+
});
24+
25+
describe.skip('client.ft.searchNoContent', () => {
1726
testUtils.testWithClient('returns total and keys', async client => {
1827
await Promise.all([
1928
client.ft.create('index', {

0 commit comments

Comments
 (0)