1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00
Files
node-redis/packages/json/lib/commands/DEL.spec.ts

29 lines
758 B
TypeScript

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