1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-03 04:01:40 +03:00
Files
node-redis/packages/json/lib/commands/MSET.spec.ts
2023-09-18 15:03:07 -04:00

36 lines
741 B
TypeScript

import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils';
import MSET from './MSET';
describe('JSON.MSET', () => {
it('transformArguments', () => {
assert.deepEqual(
MSET.transformArguments([{
key: '1',
path: '$',
value: 1
}, {
key: '2',
path: '$',
value: '2'
}]),
['JSON.MSET', '1', '$', '1', '2', '$', '"2"']
);
});
testUtils.testWithClient('client.json.mSet', async client => {
assert.equal(
await client.json.mSet([{
key: '1',
path: '$',
value: 1
}, {
key: '2',
path: '$',
value: '2'
}]),
'OK'
);
}, GLOBAL.SERVERS.OPEN);
});