You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
some json and search commands
This commit is contained in:
@@ -4,7 +4,7 @@ import STRLEN from './STRLEN';
|
||||
|
||||
describe('JSON.STRLEN', () => {
|
||||
describe('transformArguments', () => {
|
||||
it('without path', () => {
|
||||
it('simple', () => {
|
||||
assert.deepEqual(
|
||||
STRLEN.transformArguments('key'),
|
||||
['JSON.STRLEN', 'key']
|
||||
@@ -13,7 +13,9 @@ describe('JSON.STRLEN', () => {
|
||||
|
||||
it('with path', () => {
|
||||
assert.deepEqual(
|
||||
STRLEN.transformArguments('key', '$'),
|
||||
STRLEN.transformArguments('key', {
|
||||
path: '$'
|
||||
}),
|
||||
['JSON.STRLEN', 'key', '$']
|
||||
);
|
||||
});
|
||||
@@ -22,9 +24,9 @@ describe('JSON.STRLEN', () => {
|
||||
testUtils.testWithClient('client.json.strLen', async client => {
|
||||
const [, reply] = await Promise.all([
|
||||
client.json.set('key', '$', ''),
|
||||
client.json.strLen('key', '$')
|
||||
client.json.strLen('key')
|
||||
]);
|
||||
|
||||
assert.deepEqual(reply, [0]);
|
||||
assert.deepEqual(reply, 0);
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
});
|
||||
|
Reference in New Issue
Block a user