1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-17 19:41:06 +03:00

add tests

This commit is contained in:
leibale
2021-06-11 16:37:04 -04:00
parent 10e9cbc005
commit 71242304bc
19 changed files with 270 additions and 19 deletions

View File

@@ -0,0 +1,19 @@
import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient } from '../test-utils';
import { transformArguments } from './HINCRBY';
describe('HINCRBY', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 'field', 1),
['HINCRBY', 'key', 'field', '1']
);
});
itWithClient(TestRedisServers.OPEN, 'client.hIncrBy', async client => {
assert.equal(
await client.hIncrBy('key', 'field', 1),
1
);
});
});