1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

JSON commands

This commit is contained in:
dovi
2023-07-10 16:46:57 -04:00
parent 306fa6024d
commit 75fc5a92d1
14 changed files with 229 additions and 175 deletions

View File

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