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,29 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './DEL';
import DEL from './DEL';
describe('DEL', () => {
describe('transformArguments', () => {
it('key', () => {
assert.deepEqual(
transformArguments('key'),
['JSON.DEL', 'key']
);
});
it('key, path', () => {
assert.deepEqual(
transformArguments('key', '$.path'),
['JSON.DEL', 'key', '$.path']
);
});
describe('transformArguments', () => {
it('key', () => {
assert.deepEqual(
DEL.transformArguments('key'),
['JSON.DEL', 'key']
);
});
testUtils.testWithClient('client.json.del', async client => {
assert.deepEqual(
await client.json.del('key'),
0
);
}, GLOBAL.SERVERS.OPEN);
it('key, path', () => {
assert.deepEqual(
DEL.transformArguments('key', '$.path'),
['JSON.DEL', 'key', '$.path']
);
});
});
testUtils.testWithClient('client.json.del', async client => {
assert.deepEqual(
await client.json.del('key'),
0
);
}, GLOBAL.SERVERS.OPEN);
});