1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

some more commands

This commit is contained in:
Leibale
2023-05-01 06:58:27 -04:00
parent a5d0963fcf
commit 4304f4dba3
22 changed files with 354 additions and 328 deletions

View File

@@ -1,21 +1,24 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './PEXPIRETIME';
import PEXPIRETIME from './PEXPIRETIME';
describe('PEXPIRETIME', () => {
testUtils.isVersionGreaterThanHook([7]);
testUtils.isVersionGreaterThanHook([7]);
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key'),
['PEXPIRETIME', 'key']
);
});
it('transformArguments', () => {
assert.deepEqual(
PEXPIRETIME.transformArguments('key'),
['PEXPIRETIME', 'key']
);
});
testUtils.testWithClient('client.pExpireTime', async client => {
assert.equal(
await client.pExpireTime('key'),
-2
);
}, GLOBAL.SERVERS.OPEN);
testUtils.testAll('pExpireTime', async client => {
assert.equal(
await client.pExpireTime('key'),
-2
);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});