You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
* ft.alter * support paramas * remove only and skip * merge * fix imports * add Vector field * update version * push attributes * typo * test * version check * remove .only * remove unued import * add support for DIALECT * clean code Co-authored-by: Avital-Fine <avital.fine@redis.com> Co-authored-by: leibale <leibale1998@gmail.com>
34 lines
944 B
TypeScript
34 lines
944 B
TypeScript
import { strict as assert } from 'assert';
|
|
import { transformArguments } from './EXPLAIN';
|
|
|
|
describe('EXPLAIN', () => {
|
|
describe('transformArguments', () => {
|
|
it('simple', () => {
|
|
assert.deepEqual(
|
|
transformArguments('index', '*'),
|
|
['FT.EXPLAIN', 'index', '*']
|
|
);
|
|
});
|
|
|
|
it('with PARAMS', () => {
|
|
assert.deepEqual(
|
|
transformArguments('index', '*', {
|
|
PARAMS: {
|
|
param: 'value'
|
|
}
|
|
}),
|
|
['FT.EXPLAIN', 'index', '*', 'PARAMS', '2', 'param', 'value']
|
|
);
|
|
});
|
|
|
|
it('with DIALECT', () => {
|
|
assert.deepEqual(
|
|
transformArguments('index', '*', {
|
|
DIALECT: 1
|
|
}),
|
|
['FT.EXPLAIN', 'index', '*', 'DIALECT', '1']
|
|
);
|
|
});
|
|
});
|
|
});
|