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

36 lines
964 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './LOLWUT';
describe('LOLWUT', () => {
describe('transformArguments', () => {
it('simple', () => {
assert.deepEqual(
transformArguments(),
['LOLWUT']
);
});
it('with version', () => {
assert.deepEqual(
transformArguments(5),
['LOLWUT', 'VERSION', '5']
);
});
it('with version and optional arguments', () => {
assert.deepEqual(
transformArguments(5, 1, 2, 3),
['LOLWUT', 'VERSION', '5', '1', '2', '3']
);
});
});
testUtils.testWithClient('client.LOLWUT', async client => {
assert.equal(
typeof (await client.LOLWUT()),
'string'
);
}, GLOBAL.SERVERS.OPEN);
});