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 EXPIRETIME spec
This commit is contained in:
@@ -1,21 +1,24 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import { transformArguments } from './EXPIRETIME';
|
||||
import EXPIRETIME from './EXPIRETIME';
|
||||
|
||||
describe('EXPIRETIME', () => {
|
||||
testUtils.isVersionGreaterThanHook([7]);
|
||||
testUtils.isVersionGreaterThanHook([7]);
|
||||
|
||||
it('transformArguments', () => {
|
||||
assert.deepEqual(
|
||||
transformArguments('key'),
|
||||
['EXPIRETIME', 'key']
|
||||
);
|
||||
});
|
||||
it('transformArguments', () => {
|
||||
assert.deepEqual(
|
||||
EXPIRETIME.transformArguments('key'),
|
||||
['EXPIRETIME', 'key']
|
||||
);
|
||||
});
|
||||
|
||||
testUtils.testWithClient('client.expireTime', async client => {
|
||||
assert.equal(
|
||||
await client.expireTime('key'),
|
||||
-2
|
||||
);
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
testUtils.testAll('expireTime', async client => {
|
||||
assert.equal(
|
||||
await client.expireTime('key'),
|
||||
-2
|
||||
);
|
||||
}, {
|
||||
client: GLOBAL.SERVERS.OPEN,
|
||||
cluster: GLOBAL.CLUSTERS.OPEN
|
||||
});
|
||||
});
|
||||
|
@@ -98,6 +98,7 @@ import PERSIST from './PERSIST';
|
||||
import EXISTS from './EXISTS';
|
||||
import EXPIRE from './EXPIRE';
|
||||
import EXPIREAT from './EXPIREAT';
|
||||
import EXPIRETIME from './EXPIRETIME';
|
||||
import PEXPIRE from './PEXPIRE';
|
||||
import PEXPIREAT from './PEXPIREAT';
|
||||
import PEXPIRETIME from './PEXPIRETIME';
|
||||
@@ -384,6 +385,8 @@ export default {
|
||||
expire: EXPIRE,
|
||||
EXPIREAT,
|
||||
expireAt: EXPIREAT,
|
||||
EXPIRETIME,
|
||||
expireTime: EXPIRETIME,
|
||||
PEXPIRE,
|
||||
pExpire: PEXPIRE,
|
||||
PEXPIREAT,
|
||||
|
Reference in New Issue
Block a user