1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00
Files
node-redis/packages/client/lib/commands/CLIENT_PAUSE.spec.ts
Leibale Eidelman 94dbcc847b fix #1912 - CLIENT PAUSE (#2125)
* fix #1912 - CLIENT PAUSE

* fix client pause

* Update commands.ts
2022-05-11 10:02:29 -04:00

29 lines
776 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './CLIENT_PAUSE';
describe('CLIENT PAUSE', () => {
describe('transformArguments', () => {
it('simple', () => {
assert.deepEqual(
transformArguments(0),
['CLIENT', 'PAUSE', '0']
);
});
it('with mode', () => {
assert.deepEqual(
transformArguments(0, 'ALL'),
['CLIENT', 'PAUSE', '0', 'ALL']
);
});
});
testUtils.testWithClient('client.clientPause', async client => {
assert.equal(
await client.clientPause(0),
'OK'
);
}, GLOBAL.SERVERS.OPEN);
});