1
0
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:
dovi
2023-05-03 14:18:15 -04:00
parent 1a7d5ff8e4
commit 3ab6241656
2 changed files with 19 additions and 13 deletions

View File

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