You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
fix HRANDFIELD spec
This commit is contained in:
@@ -1,21 +1,24 @@
|
|||||||
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 './HRANDFIELD';
|
import HRANDFIELD from './HRANDFIELD';
|
||||||
|
|
||||||
describe('HRANDFIELD', () => {
|
describe('HRANDFIELD', () => {
|
||||||
testUtils.isVersionGreaterThanHook([6, 2]);
|
testUtils.isVersionGreaterThanHook([6, 2]);
|
||||||
|
|
||||||
it('transformArguments', () => {
|
it('transformArguments', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('key'),
|
HRANDFIELD.transformArguments('key'),
|
||||||
['HRANDFIELD', 'key']
|
['HRANDFIELD', 'key']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
testUtils.testWithClient('client.hRandField', async client => {
|
testUtils.testAll('hRandField', async client => {
|
||||||
assert.equal(
|
assert.equal(
|
||||||
await client.hRandField('key'),
|
await client.hRandField('key'),
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
}, GLOBAL.SERVERS.OPEN);
|
}, {
|
||||||
|
client: GLOBAL.SERVERS.OPEN,
|
||||||
|
cluster: GLOBAL.CLUSTERS.OPEN
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user