You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
- The default dialect `DEFAULT_DIALECT` is now set to '2' - Automatically append DIALECT parameter to search commands when not explicitly specified
21 lines
609 B
TypeScript
21 lines
609 B
TypeScript
import { strict as assert } from 'node:assert';
|
|
import EXPLAINCLI from './EXPLAINCLI';
|
|
import { parseArgs } from '@redis/client/lib/commands/generic-transformers';
|
|
import { DEFAULT_DIALECT } from '../dialect/default';
|
|
|
|
describe('EXPLAINCLI', () => {
|
|
it('transformArguments', () => {
|
|
assert.deepEqual(
|
|
parseArgs(EXPLAINCLI, 'index', '*'),
|
|
['FT.EXPLAINCLI', 'index', '*', 'DIALECT', DEFAULT_DIALECT]
|
|
);
|
|
});
|
|
|
|
it('with dialect', () => {
|
|
assert.deepEqual(
|
|
parseArgs(EXPLAINCLI, 'index', '*', {DIALECT: 1}),
|
|
['FT.EXPLAINCLI', 'index', '*', 'DIALECT', '1']
|
|
);
|
|
});
|
|
});
|