1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-03 04:01:40 +03:00
Files
node-redis/packages/client/lib/commands/PSETEX.spec.ts
2021-12-20 14:47:51 -05:00

28 lines
805 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './PSETEX';
describe('PSETEX', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 1, 'value'),
['PSETEX', 'key', '1', 'value']
);
});
testUtils.testWithClient('client.pSetEx', async client => {
const a = await client.pSetEx('key', 1, 'value');
assert.equal(
await client.pSetEx('key', 1, 'value'),
'OK'
);
}, GLOBAL.SERVERS.OPEN);
testUtils.testWithCluster('cluster.pSetEx', async cluster => {
assert.equal(
await cluster.pSetEx('key', 1, 'value'),
'OK'
);
}, GLOBAL.CLUSTERS.OPEN);
});