1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
This commit is contained in:
Leibale
2023-06-21 19:09:45 -04:00
parent 4894c26458
commit b46f08228c
53 changed files with 831 additions and 630 deletions

View File

@@ -1,11 +1,31 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import CONFIG_GET from './CONFIG_GET';
describe('CONFIG GET', () => {
it('transformArguments', () => {
assert.deepEqual(
CONFIG_GET.transformArguments('*'),
['CONFIG', 'GET', '*']
);
describe('transformArguments', () => {
it('string', () => {
assert.deepEqual(
CONFIG_GET.transformArguments('*'),
['CONFIG', 'GET', '*']
);
});
it('Array', () => {
assert.deepEqual(
CONFIG_GET.transformArguments(['1', '2']),
['CONFIG', 'GET', '1', '2']
);
});
});
testUtils.testWithClient('client.configGet', async client => {
const config = await client.configGet('*');
assert.equal(typeof config, 'object');
for (const [key, value] of Object.entries(config)) {
assert.equal(typeof key, 'string');
assert.equal(typeof value, 'string');
}
}, GLOBAL.SERVERS.OPEN);
});