1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00
Files
node-redis/packages/client/lib/commands/ACL_GENPASS.spec.ts
Leibale 9faa3e77c4 WIP
2023-04-23 07:56:15 -04:00

31 lines
721 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import ACL_GENPASS from './ACL_GENPASS';
describe('ACL GENPASS', () => {
testUtils.isVersionGreaterThanHook([6]);
describe('transformArguments', () => {
it('simple', () => {
assert.deepEqual(
ACL_GENPASS.transformArguments(),
['ACL', 'GENPASS']
);
});
it('with bits', () => {
assert.deepEqual(
ACL_GENPASS.transformArguments(128),
['ACL', 'GENPASS', '128']
);
});
});
testUtils.testWithClient('client.aclGenPass', async client => {
assert.equal(
typeof await client.aclGenPass(),
'string'
);
}, GLOBAL.SERVERS.OPEN);
});