You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-09-11 18:50:46 +03:00
add support for options in a command function (.get, .set, ...), add support for the SELECT command, implement a couple of commands, fix client socket reconnection strategy, add support for using replicas (RO) in cluster, and more..
This commit is contained in:
@@ -1,12 +1,20 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import RedisClient from '../client';
|
||||
import { TestRedisServers, itWithClient } from '../test-utils';
|
||||
import { transformArguments } from './DEL';
|
||||
|
||||
describe('DEL', () => {
|
||||
describe('transformArguments', () => {
|
||||
it('multiple keys', () => {
|
||||
it('string', () => {
|
||||
assert.deepEqual(
|
||||
transformArguments('key1', 'key2'),
|
||||
transformArguments('key'),
|
||||
['DEL', 'key']
|
||||
);
|
||||
});
|
||||
|
||||
it('array', () => {
|
||||
assert.deepEqual(
|
||||
transformArguments(['key1', 'key2']),
|
||||
['DEL', 'key1', 'key2']
|
||||
);
|
||||
});
|
||||
@@ -14,7 +22,7 @@ describe('DEL', () => {
|
||||
|
||||
itWithClient(TestRedisServers.OPEN, 'client.del', async client => {
|
||||
assert.equal(
|
||||
await client.del('key1', 'key2'),
|
||||
await client.del('key'),
|
||||
0
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user