You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
new "transform arguments" API for better key and metadata extraction (#2733)
* Parser support with all commands * remove "dist" from all imports for consistency * address most of my review comments * small tweak to multi type mapping handling * tweak multi commands / fix addScript cases * nits * addressed all in person review comments * revert addCommand/addScript changes to multi-commands addCommand needs to be there for sendCommand like ability within a multi. If its there, it might as well be used by createCommand() et al, to avoid repeating code. addScript is there (even though only used once), but now made private to keep the logic for bookkeeping near each other.
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import DEL from './DEL';
|
||||
import { parseArgs } from './generic-transformers';
|
||||
|
||||
describe('DEL', () => {
|
||||
describe('transformArguments', () => {
|
||||
it('string', () => {
|
||||
assert.deepEqual(
|
||||
DEL.transformArguments('key'),
|
||||
parseArgs(DEL, 'key'),
|
||||
['DEL', 'key']
|
||||
);
|
||||
});
|
||||
|
||||
it('array', () => {
|
||||
assert.deepEqual(
|
||||
DEL.transformArguments(['key1', 'key2']),
|
||||
parseArgs(DEL, ['key1', 'key2']),
|
||||
['DEL', 'key1', 'key2']
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user