1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
node-redis/packages/client/lib/commands/FUNCTION_FLUSH.spec.ts
Leibale f150e86f95 wip
2023-06-19 18:04:31 -04:00

31 lines
741 B
TypeScript

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