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

fix INCRBY spec

This commit is contained in:
dovi
2023-05-03 15:15:08 -04:00
parent 8d4421a8c1
commit c0834879f3

View File

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