1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +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,19 +1,22 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './PTTL';
import PTTL from './PTTL';
describe('PTTL', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key'),
['PTTL', 'key']
);
});
it('transformArguments', () => {
assert.deepEqual(
PTTL.transformArguments('key'),
['PTTL', 'key']
);
});
testUtils.testWithClient('client.pTTL', async client => {
assert.equal(
await client.pTTL('key'),
-2
);
}, GLOBAL.SERVERS.OPEN);
testUtils.testAll('pTTL', async client => {
assert.equal(
await client.pTTL('key'),
-2
);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});