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

fix OBJECT_REFCOUNT spec

This commit is contained in:
dovi
2023-05-03 14:21:37 -04:00
parent 3ab6241656
commit 7d963a5d1b
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_REFCOUNT';
import OBJECT_REFCOUNT from './OBJECT_REFCOUNT';
describe('OBJECT REFCOUNT', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key'),
['OBJECT', 'REFCOUNT', 'key']
);
});
it('transformArguments', () => {
assert.deepEqual(
OBJECT_REFCOUNT.transformArguments('key'),
['OBJECT', 'REFCOUNT', 'key']
);
});
testUtils.testWithClient('client.objectRefCount', async client => {
assert.equal(
await client.objectRefCount('key'),
null
);
}, GLOBAL.SERVERS.OPEN);
testUtils.testAll('client.objectRefCount', async client => {
assert.equal(
await client.objectRefCount('key'),
null
);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});