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/UNLINK.spec.ts
2021-06-11 13:25:01 -04:00

29 lines
742 B
TypeScript

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