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 OBJECT_IDLETIME spec
This commit is contained in:
@@ -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 './OBJECT_IDLETIME';
|
import OBJECT_IDLETIME from './OBJECT_IDLETIME';
|
||||||
|
|
||||||
describe('OBJECT IDLETIME', () => {
|
describe('OBJECT IDLETIME', () => {
|
||||||
it('transformArguments', () => {
|
it('transformArguments', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('key'),
|
OBJECT_IDLETIME.transformArguments('key'),
|
||||||
['OBJECT', 'IDLETIME', 'key']
|
['OBJECT', 'IDLETIME', 'key']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
testUtils.testWithClient('client.objectIdleTime', async client => {
|
testUtils.testAll('client.objectIdleTime', async client => {
|
||||||
assert.equal(
|
assert.equal(
|
||||||
await client.objectIdleTime('key'),
|
await client.objectIdleTime('key'),
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
}, GLOBAL.SERVERS.OPEN);
|
}, {
|
||||||
|
client: GLOBAL.SERVERS.OPEN,
|
||||||
|
cluster: GLOBAL.CLUSTERS.OPEN
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@@ -98,6 +98,7 @@ import MSET from './MSET';
|
|||||||
import MSETNX from './MSETNX';
|
import MSETNX from './MSETNX';
|
||||||
import OBJECT_ENCODING from './OBJECT_ENCODING';
|
import OBJECT_ENCODING from './OBJECT_ENCODING';
|
||||||
import OBJECT_FREQ from './OBJECT_FREQ';
|
import OBJECT_FREQ from './OBJECT_FREQ';
|
||||||
|
import OBJECT_IDLETIME from './OBJECT_IDLETIME';
|
||||||
import PERSIST from './PERSIST';
|
import PERSIST from './PERSIST';
|
||||||
import EXISTS from './EXISTS';
|
import EXISTS from './EXISTS';
|
||||||
import EXPIRE from './EXPIRE';
|
import EXPIRE from './EXPIRE';
|
||||||
@@ -389,6 +390,8 @@ export default {
|
|||||||
objectEncoding: OBJECT_ENCODING,
|
objectEncoding: OBJECT_ENCODING,
|
||||||
OBJECT_FREQ,
|
OBJECT_FREQ,
|
||||||
objectFreq: OBJECT_FREQ,
|
objectFreq: OBJECT_FREQ,
|
||||||
|
OBJECT_IDLETIME,
|
||||||
|
objectIdleTime: OBJECT_IDLETIME,
|
||||||
PERSIST,
|
PERSIST,
|
||||||
persist: PERSIST,
|
persist: PERSIST,
|
||||||
EXISTS,
|
EXISTS,
|
||||||
|
Reference in New Issue
Block a user