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

fix GETSET spec

This commit is contained in:
dovi
2023-05-03 15:06:41 -04:00
parent 58af728055
commit b34e524880

View File

@@ -1,26 +1,22 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './GETSET';
import GETSET from './GETSET';
describe('GETSET', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 'value'),
['GETSET', 'key', 'value']
);
});
it('transformArguments', () => {
assert.deepEqual(
GETSET.transformArguments('key', 'value'),
['GETSET', 'key', 'value']
);
});
testUtils.testWithClient('client.getSet', async client => {
assert.equal(
await client.getSet('key', 'value'),
null
);
}, GLOBAL.SERVERS.OPEN);
testUtils.testWithCluster('cluster.getSet', async cluster => {
assert.equal(
await cluster.getSet('key', 'value'),
null
);
}, GLOBAL.CLUSTERS.OPEN);
testUtils.testAll('getSet', async client => {
assert.equal(
await client.getSet('key', 'value'),
null
);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});