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