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

fix HDEL spec

This commit is contained in:
dovi
2023-05-03 15:30:55 -04:00
parent 2899653cd3
commit afc33764e9
2 changed files with 24 additions and 22 deletions

View File

@@ -1,28 +1,31 @@
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 './HDEL'; import HDEL from './HDEL';
describe('HDEL', () => { describe('HDEL', () => {
describe('transformArguments', () => { describe('transformArguments', () => {
it('string', () => { it('string', () => {
assert.deepEqual( assert.deepEqual(
transformArguments('key', 'field'), HDEL.transformArguments('key', 'field'),
['HDEL', 'key', 'field'] ['HDEL', 'key', 'field']
); );
});
it('array', () => {
assert.deepEqual(
transformArguments('key', ['1', '2']),
['HDEL', 'key', '1', '2']
);
});
}); });
testUtils.testWithClient('client.hDel', async client => { it('array', () => {
assert.equal( assert.deepEqual(
await client.hDel('key', 'field'), HDEL.transformArguments('key', ['1', '2']),
0 ['HDEL', 'key', '1', '2']
); );
}, GLOBAL.SERVERS.OPEN); });
});
testUtils.testAll('hDel', async client => {
assert.equal(
await client.hDel('key', 'field'),
0
);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
}); });

View File

@@ -11,7 +11,6 @@
# waiting List categoreis # waiting List categoreis
- String
- Hash - Hash
- List - List
- Set - Set