1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

more commands

This commit is contained in:
dovi
2023-07-06 15:51:12 -04:00
parent d986ff52b6
commit e64946566a
20 changed files with 295 additions and 261 deletions

View File

@@ -1,28 +1,28 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './DEBUG_MEMORY';
import DEBUG_MEMORY from './DEBUG_MEMORY';
describe('DEBUG MEMORY', () => {
describe('transformArguments', () => {
it('without path', () => {
assert.deepEqual(
transformArguments('key'),
['JSON.DEBUG', 'MEMORY', 'key']
);
});
it('with path', () => {
assert.deepEqual(
transformArguments('key', '$'),
['JSON.DEBUG', 'MEMORY', 'key', '$']
);
});
describe('transformArguments', () => {
it('without path', () => {
assert.deepEqual(
DEBUG_MEMORY.transformArguments('key'),
['JSON.DEBUG', 'MEMORY', 'key']
);
});
testUtils.testWithClient('client.json.arrTrim', async client => {
assert.deepEqual(
await client.json.debugMemory('key', '$'),
[]
);
}, GLOBAL.SERVERS.OPEN);
it('with path', () => {
assert.deepEqual(
DEBUG_MEMORY.transformArguments('key', '$'),
['JSON.DEBUG', 'MEMORY', 'key', '$']
);
});
});
testUtils.testWithClient('client.json.arrTrim', async client => {
assert.deepEqual(
await client.json.debugMemory('key', '$'),
[]
);
}, GLOBAL.SERVERS.OPEN);
});