1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

fix OBJECT_FREQ spec

This commit is contained in:
dovi
2023-05-03 14:15:42 -04:00
parent 19cd6dc04a
commit 1a7d5ff8e4
2 changed files with 19 additions and 13 deletions

View File

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

View File

@@ -97,6 +97,7 @@ import MOVE from './MOVE';
import MSET from './MSET';
import MSETNX from './MSETNX';
import OBJECT_ENCODING from './OBJECT_ENCODING';
import OBJECT_FREQ from './OBJECT_FREQ';
import PERSIST from './PERSIST';
import EXISTS from './EXISTS';
import EXPIRE from './EXPIRE';
@@ -386,6 +387,8 @@ export default {
mSetNX: MSETNX,
OBJECT_ENCODING,
objectEncoding: OBJECT_ENCODING,
OBJECT_FREQ,
objectFreq: OBJECT_FREQ,
PERSIST,
persist: PERSIST,
EXISTS,