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/SCRIPT_FLUSH.spec.ts

29 lines
763 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './SCRIPT_FLUSH';
describe('SCRIPT FLUSH', () => {
describe('transformArguments', () => {
it('simple', () => {
assert.deepEqual(
transformArguments(),
['SCRIPT', 'FLUSH']
);
});
it('with mode', () => {
assert.deepEqual(
transformArguments('SYNC'),
['SCRIPT', 'FLUSH', 'SYNC']
);
});
});
testUtils.testWithClient('client.scriptFlush', async client => {
assert.equal(
await client.scriptFlush(),
'OK'
);
}, GLOBAL.SERVERS.OPEN);
});