1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-11 22:42:42 +03:00
Files
node-redis/lib/commands/DEL.spec.ts

29 lines
736 B
TypeScript

import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient } from '../test-utils';
import { transformArguments } from './DEL';
describe('DEL', () => {
describe('transformArguments', () => {
it('string', () => {
assert.deepEqual(
transformArguments('key'),
['DEL', 'key']
);
});
it('array', () => {
assert.deepEqual(
transformArguments(['key1', 'key2']),
['DEL', 'key1', 'key2']
);
});
});
itWithClient(TestRedisServers.OPEN, 'client.del', async client => {
assert.equal(
await client.del('key'),
0
);
});
});