1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

more commands

This commit is contained in:
dovi
2023-07-10 17:40:37 -04:00
parent e176a387b1
commit 513668e545
8 changed files with 122 additions and 109 deletions

View File

@@ -1,21 +1,21 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './NUMINCRBY';
import NUMINCRBY from './NUMINCRBY';
describe('NUMINCRBY', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', '$', 1),
['JSON.NUMINCRBY', 'key', '$', '1']
);
});
describe('JSON.NUMINCRBY', () => {
it('transformArguments', () => {
assert.deepEqual(
NUMINCRBY.transformArguments('key', '$', 1),
['JSON.NUMINCRBY', 'key', '$', '1']
);
});
testUtils.testWithClient('client.json.numIncrBy', async client => {
await client.json.set('key', '$', 0);
testUtils.testWithClient('client.json.numIncrBy', async client => {
await client.json.set('key', '$', 0);
assert.deepEqual(
await client.json.numIncrBy('key', '$', 1),
[1]
);
}, GLOBAL.SERVERS.OPEN);
assert.deepEqual(
await client.json.numIncrBy('key', '$', 1),
[1]
);
}, GLOBAL.SERVERS.OPEN);
});