You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
wip
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import { transformArguments, transformReply } from './CLUSTER_INFO';
|
||||
import CLUSTER_INFO from './CLUSTER_INFO';
|
||||
|
||||
describe('CLUSTER INFO', () => {
|
||||
it('transformArguments', () => {
|
||||
assert.deepEqual(
|
||||
transformArguments(),
|
||||
CLUSTER_INFO.transformArguments(),
|
||||
['CLUSTER', 'INFO']
|
||||
);
|
||||
});
|
||||
|
@@ -1,20 +1,28 @@
|
||||
import { strict as assert } from 'node:assert';
|
||||
import { transformArguments } from './INFO';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import INFO from './INFO';
|
||||
|
||||
describe('INFO', () => {
|
||||
describe('transformArguments', () => {
|
||||
it('simple', () => {
|
||||
assert.deepEqual(
|
||||
transformArguments(),
|
||||
['INFO']
|
||||
);
|
||||
});
|
||||
|
||||
it('server section', () => {
|
||||
assert.deepEqual(
|
||||
transformArguments('server'),
|
||||
['INFO', 'server']
|
||||
);
|
||||
});
|
||||
describe('transformArguments', () => {
|
||||
it('simple', () => {
|
||||
assert.deepEqual(
|
||||
INFO.transformArguments(),
|
||||
['INFO']
|
||||
);
|
||||
});
|
||||
|
||||
it('server section', () => {
|
||||
assert.deepEqual(
|
||||
INFO.transformArguments('server'),
|
||||
['INFO', 'server']
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
testUtils.testWithClient('client.info', async client => {
|
||||
assert.equal(
|
||||
typeof await client.info(),
|
||||
'string'
|
||||
);
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
});
|
||||
|
@@ -2,13 +2,10 @@ import { strict as assert } from 'node:assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
|
||||
describe('KEYS', () => {
|
||||
testUtils.testAll('keys', async client => {
|
||||
testUtils.testWithClient('keys', async client => {
|
||||
assert.deepEqual(
|
||||
await client.keys('pattern'),
|
||||
[]
|
||||
);
|
||||
}, {
|
||||
client: GLOBAL.SERVERS.OPEN,
|
||||
cluster: GLOBAL.CLUSTERS.OPEN
|
||||
});
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
});
|
||||
|
@@ -50,7 +50,7 @@ describe('SCAN', () => {
|
||||
});
|
||||
});
|
||||
|
||||
testUtils.testAll('scan', async client => {
|
||||
testUtils.testWithClient('client.scan', async client => {
|
||||
assert.deepEqual(
|
||||
await client.scan('0'),
|
||||
{
|
||||
@@ -58,8 +58,5 @@ describe('SCAN', () => {
|
||||
keys: []
|
||||
}
|
||||
);
|
||||
}, {
|
||||
client: GLOBAL.SERVERS.OPEN,
|
||||
cluster: GLOBAL.CLUSTERS.OPEN
|
||||
});
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
});
|
||||
|
@@ -10,13 +10,10 @@ describe('WAIT', () => {
|
||||
);
|
||||
});
|
||||
|
||||
testUtils.testAll('wait', async client => {
|
||||
testUtils.testWithClient('client.wait', async client => {
|
||||
assert.equal(
|
||||
await client.wait(0, 1),
|
||||
0
|
||||
);
|
||||
}, {
|
||||
client: GLOBAL.SERVERS.OPEN,
|
||||
cluster: GLOBAL.CLUSTERS.OPEN
|
||||
});
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
});
|
||||
|
Reference in New Issue
Block a user