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

fix GETDEL spec

This commit is contained in:
dovi
2023-05-03 14:58:34 -04:00
parent 9dd536edd9
commit e0bc86346e

View File

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