You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
Update doctest client with latest v4 release (#2844)
This commit is contained in:
@@ -233,6 +233,15 @@ describe('SEARCH', () => {
|
||||
['FT.SEARCH', 'index', 'query', 'DIALECT', '1']
|
||||
);
|
||||
});
|
||||
|
||||
it('with TIMEOUT', () => {
|
||||
assert.deepEqual(
|
||||
transformArguments('index', 'query', {
|
||||
TIMEOUT: 5
|
||||
}),
|
||||
['FT.SEARCH', 'index', 'query', 'TIMEOUT', '5']
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('client.ft.search', () => {
|
||||
@@ -267,7 +276,8 @@ describe('SEARCH', () => {
|
||||
client.ft.create('index', {
|
||||
field: SchemaFieldTypes.NUMERIC
|
||||
}),
|
||||
client.hSet('1', 'field', '1')
|
||||
client.hSet('1', 'field', '1'),
|
||||
client.hSet('2', 'field', '2')
|
||||
]);
|
||||
|
||||
assert.deepEqual(
|
||||
@@ -275,10 +285,13 @@ describe('SEARCH', () => {
|
||||
RETURN: []
|
||||
}),
|
||||
{
|
||||
total: 1,
|
||||
total: 2,
|
||||
documents: [{
|
||||
id: '1',
|
||||
value: Object.create(null)
|
||||
}, {
|
||||
id: '2',
|
||||
value: Object.create(null)
|
||||
}]
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user