You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-03 04:01:40 +03:00
28 lines
805 B
TypeScript
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);
|
|
});
|