1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00
Files
node-redis/packages/client/lib/commands/ACL_CAT.spec.ts
2023-09-18 15:03:07 -04:00

32 lines
818 B
TypeScript

import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils';
import ACL_CAT from './ACL_CAT';
describe('ACL CAT', () => {
testUtils.isVersionGreaterThanHook([6]);
describe('transformArguments', () => {
it('simple', () => {
assert.deepEqual(
ACL_CAT.transformArguments(),
['ACL', 'CAT']
);
});
it('with categoryName', () => {
assert.deepEqual(
ACL_CAT.transformArguments('dangerous'),
['ACL', 'CAT', 'dangerous']
);
});
});
testUtils.testWithClient('client.aclCat', async client => {
const categories = await client.aclCat();
assert.ok(Array.isArray(categories));
for (const category of categories) {
assert.equal(typeof category, 'string');
}
}, GLOBAL.SERVERS.OPEN);
});