You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
use dockers for tests, use npm workspaces, add rejson & redisearch modules, fix some bugs
This commit is contained in:
37
packages/json/lib/commands/ARRPOP.spec.ts
Normal file
37
packages/json/lib/commands/ARRPOP.spec.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import { transformArguments } from './ARRPOP';
|
||||
|
||||
describe('ARRPOP', () => {
|
||||
describe('transformArguments', () => {
|
||||
it('key', () => {
|
||||
assert.deepEqual(
|
||||
transformArguments('key'),
|
||||
['JSON.ARRPOP', 'key']
|
||||
);
|
||||
});
|
||||
|
||||
it('key, path', () => {
|
||||
assert.deepEqual(
|
||||
transformArguments('key', '$'),
|
||||
['JSON.ARRPOP', 'key', '$']
|
||||
);
|
||||
});
|
||||
|
||||
it('key, path, index', () => {
|
||||
assert.deepEqual(
|
||||
transformArguments('key', '$', 0),
|
||||
['JSON.ARRPOP', 'key', '$', '0']
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
testUtils.testWithClient('client.json.arrPop', async client => {
|
||||
await client.json.set('key', '$', []);
|
||||
|
||||
assert.deepEqual(
|
||||
await client.json.arrPop('key', '$'),
|
||||
[null]
|
||||
);
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
});
|
Reference in New Issue
Block a user