Skip to content

Commit e2c0029

Browse files
committed
test(search): adapt SUGGET tests for Redis 8 empty results
- Update tests to expect empty array ([]) instead of null for SUGGET variants - Affects sugGet, sugGetWithPayloads, sugGetWithScores, and sugGetWithScoresWithPayloads
1 parent b39a810 commit e2c0029

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ describe('FT.SUGGET', () => {
2929

3030
describe('client.ft.sugGet', () => {
3131
testUtils.testWithClient('null', async client => {
32-
assert.equal(
32+
assert.deepStrictEqual(
3333
await client.ft.sugGet('key', 'prefix'),
34-
null
34+
[]
3535
);
3636
}, GLOBAL.SERVERS.OPEN);
3737

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ describe('FT.SUGGET WITHPAYLOADS', () => {
1313

1414
describe('client.ft.sugGetWithPayloads', () => {
1515
testUtils.testWithClient('null', async client => {
16-
assert.equal(
16+
assert.deepStrictEqual(
1717
await client.ft.sugGetWithPayloads('key', 'prefix'),
18-
null
18+
[]
1919
);
2020
}, GLOBAL.SERVERS.OPEN);
2121

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ describe('FT.SUGGET WITHSCORES', () => {
1313

1414
describe('client.ft.sugGetWithScores', () => {
1515
testUtils.testWithClient('null', async client => {
16-
assert.equal(
16+
assert.deepStrictEqual(
1717
await client.ft.sugGetWithScores('key', 'prefix'),
18-
null
18+
[]
1919
);
2020
}, GLOBAL.SERVERS.OPEN);
2121

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ describe('FT.SUGGET WITHSCORES WITHPAYLOADS', () => {
1313

1414
describe('client.ft.sugGetWithScoresWithPayloads', () => {
1515
testUtils.testWithClient('null', async client => {
16-
assert.equal(
16+
assert.deepStrictEqual(
1717
await client.ft.sugGetWithScoresWithPayloads('key', 'prefix'),
18-
null
18+
[]
1919
);
2020
}, GLOBAL.SERVERS.OPEN);
2121

0 commit comments

Comments
 (0)