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

36 lines
945 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { RedisFlushModes, transformArguments } from './FLUSHALL';
describe('FLUSHALL', () => {
describe('transformArguments', () => {
it('default', () => {
assert.deepEqual(
transformArguments(),
['FLUSHALL']
);
});
it('ASYNC', () => {
assert.deepEqual(
transformArguments(RedisFlushModes.ASYNC),
['FLUSHALL', 'ASYNC']
);
});
it('SYNC', () => {
assert.deepEqual(
transformArguments(RedisFlushModes.SYNC),
['FLUSHALL', 'SYNC']
);
});
});
testUtils.testWithClient('client.flushAll', async client => {
assert.equal(
await client.flushAll(),
'OK'
);
}, GLOBAL.SERVERS.OPEN);
});