1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

fix HINCRBY spec

This commit is contained in:
dovi
2023-05-03 16:50:38 -04:00
parent 3bda368acb
commit 0516ca32bd

View File

@@ -1,19 +1,22 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './HINCRBY';
import HINCRBY from './HINCRBY';
describe('HINCRBY', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 'field', 1),
['HINCRBY', 'key', 'field', '1']
);
});
it('transformArguments', () => {
assert.deepEqual(
HINCRBY.transformArguments('key', 'field', 1),
['HINCRBY', 'key', 'field', '1']
);
});
testUtils.testWithClient('client.hIncrBy', async client => {
assert.equal(
await client.hIncrBy('key', 'field', 1),
1
);
}, GLOBAL.SERVERS.OPEN);
testUtils.testAll('hIncrBy', async client => {
assert.equal(
await client.hIncrBy('key', 'field', 1),
1
);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});