1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00
Files
node-redis/packages/json/lib/commands/DEL.spec.ts
Leibale fdd1978d92 WIP
2023-07-18 16:32:45 -04:00

32 lines
684 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import DEL from './DEL';
describe('JSON.DEL', () => {
describe('transformArguments', () => {
it('simple', () => {
assert.deepEqual(
DEL.transformArguments('key'),
['JSON.DEL', 'key']
);
});
it('with path', () => {
assert.deepEqual(
DEL.transformArguments('key', {
path: '$.path'
}),
['JSON.DEL', 'key', '$.path']
);
});
});
testUtils.testWithClient('client.json.del', async client => {
assert.deepEqual(
await client.json.del('key'),
0
);
}, GLOBAL.SERVERS.OPEN);
});