1
0
mirror of https://github.com/redis/node-redis.git synced 2025-09-02 22:41:17 +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 './HINCRBYFLOAT';
describe('HINCRBYFLOAT', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 'field', 1.5),
['HINCRBYFLOAT', 'key', 'field', '1.5']
);
});
itWithClient(TestRedisServers.OPEN, 'client.hIncrByFloat', async client => {
assert.equal(
await client.hIncrByFloat('key', 'field', 1.5),
'1.5'
);
});
});