You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-03 04:01:40 +03:00
* 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.
35 lines
826 B
TypeScript
35 lines
826 B
TypeScript
import { strict as assert } from 'node:assert';
|
|
import testUtils, { GLOBAL } from '../test-utils';
|
|
import ZMSCORE from './ZMSCORE';
|
|
import { parseArgs } from './generic-transformers';
|
|
|
|
describe('ZMSCORE', () => {
|
|
testUtils.isVersionGreaterThanHook([6, 2]);
|
|
|
|
describe('transformArguments', () => {
|
|
it('string', () => {
|
|
assert.deepEqual(
|
|
parseArgs(ZMSCORE, 'key', 'member'),
|
|
['ZMSCORE', 'key', 'member']
|
|
);
|
|
});
|
|
|
|
it('array', () => {
|
|
assert.deepEqual(
|
|
parseArgs(ZMSCORE, 'key', ['1', '2']),
|
|
['ZMSCORE', 'key', '1', '2']
|
|
);
|
|
});
|
|
});
|
|
|
|
testUtils.testAll('zmScore', async client => {
|
|
assert.deepEqual(
|
|
await client.zmScore('key', 'member'),
|
|
[null]
|
|
);
|
|
}, {
|
|
client: GLOBAL.SERVERS.OPEN,
|
|
cluster: GLOBAL.CLUSTERS.OPEN
|
|
});
|
|
});
|