You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
import { strict as assert } from 'assert';
|
|
import testUtils, { GLOBAL } from '../test-utils';
|
|
import { transformArguments } from './ACL_GETUSER';
|
|
|
|
describe('ACL GETUSER', () => {
|
|
testUtils.isVersionGreaterThanHook([6]);
|
|
|
|
it('transformArguments', () => {
|
|
assert.deepEqual(
|
|
transformArguments('username'),
|
|
['ACL', 'GETUSER', 'username']
|
|
);
|
|
});
|
|
|
|
testUtils.testWithClient('client.aclGetUser', async client => {
|
|
assert.deepEqual(
|
|
await client.aclGetUser('default'),
|
|
{
|
|
passwords: [],
|
|
commands: '+@all',
|
|
keys: ['*'],
|
|
...(testUtils.isVersionGreaterThan([6, 2]) ? {
|
|
flags: ['on', 'allkeys', 'allchannels', 'allcommands', 'nopass'],
|
|
channels: ['*']
|
|
} : {
|
|
flags: ['on', 'allkeys', 'allcommands', 'nopass'],
|
|
channels: undefined
|
|
})
|
|
}
|
|
);
|
|
}, GLOBAL.SERVERS.OPEN);
|
|
});
|