You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
fix OBJECT_REFCOUNT spec
This commit is contained in:
@@ -1,19 +1,22 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import { transformArguments } from './OBJECT_REFCOUNT';
|
||||
import OBJECT_REFCOUNT from './OBJECT_REFCOUNT';
|
||||
|
||||
describe('OBJECT REFCOUNT', () => {
|
||||
it('transformArguments', () => {
|
||||
assert.deepEqual(
|
||||
transformArguments('key'),
|
||||
['OBJECT', 'REFCOUNT', 'key']
|
||||
);
|
||||
});
|
||||
it('transformArguments', () => {
|
||||
assert.deepEqual(
|
||||
OBJECT_REFCOUNT.transformArguments('key'),
|
||||
['OBJECT', 'REFCOUNT', 'key']
|
||||
);
|
||||
});
|
||||
|
||||
testUtils.testWithClient('client.objectRefCount', async client => {
|
||||
assert.equal(
|
||||
await client.objectRefCount('key'),
|
||||
null
|
||||
);
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
testUtils.testAll('client.objectRefCount', async client => {
|
||||
assert.equal(
|
||||
await client.objectRefCount('key'),
|
||||
null
|
||||
);
|
||||
}, {
|
||||
client: GLOBAL.SERVERS.OPEN,
|
||||
cluster: GLOBAL.CLUSTERS.OPEN
|
||||
});
|
||||
});
|
||||
|
@@ -99,6 +99,7 @@ import MSETNX from './MSETNX';
|
||||
import OBJECT_ENCODING from './OBJECT_ENCODING';
|
||||
import OBJECT_FREQ from './OBJECT_FREQ';
|
||||
import OBJECT_IDLETIME from './OBJECT_IDLETIME';
|
||||
import OBJECT_REFCOUNT from './OBJECT_REFCOUNT';
|
||||
import PERSIST from './PERSIST';
|
||||
import EXISTS from './EXISTS';
|
||||
import EXPIRE from './EXPIRE';
|
||||
@@ -392,6 +393,8 @@ export default {
|
||||
objectFreq: OBJECT_FREQ,
|
||||
OBJECT_IDLETIME,
|
||||
objectIdleTime: OBJECT_IDLETIME,
|
||||
OBJECT_REFCOUNT,
|
||||
objectRefCount: OBJECT_REFCOUNT,
|
||||
PERSIST,
|
||||
persist: PERSIST,
|
||||
EXISTS,
|
||||
|
Reference in New Issue
Block a user