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 './NUMMULTBY';
import NUMMULTBY from './NUMMULTBY';
describe('NUMMULTBY', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', '$', 2),
['JSON.NUMMULTBY', 'key', '$', '2']
);
});
describe('JSON.NUMMULTBY', () => {
it('transformArguments', () => {
assert.deepEqual(
NUMMULTBY.transformArguments('key', '$', 2),
['JSON.NUMMULTBY', 'key', '$', '2']
);
});
testUtils.testWithClient('client.json.numMultBy', async client => {
await client.json.set('key', '$', 1);
testUtils.testWithClient('client.json.numMultBy', async client => {
await client.json.set('key', '$', 1);
assert.deepEqual(
await client.json.numMultBy('key', '$', 2),
[2]
);
}, GLOBAL.SERVERS.OPEN);
assert.deepEqual(
await client.json.numMultBy('key', '$', 2),
[2]
);
}, GLOBAL.SERVERS.OPEN);
});