1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
node-redis/lib/commands/TOUCH.spec.ts
2021-06-11 13:25:01 -04:00

29 lines
736 B
TypeScript

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