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

fix HINCRBYFLOAT spec

This commit is contained in:
dovi
2023-05-03 16:53:36 -04:00
parent 0516ca32bd
commit d9cac4665b

View File

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