1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
node-redis/packages/client/lib/commands/CLUSTER_REPLICAS.spec.ts
2023-09-18 15:03:07 -04:00

21 lines
623 B
TypeScript

import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils';
import CLUSTER_REPLICAS from './CLUSTER_REPLICAS';
describe('CLUSTER REPLICAS', () => {
it('transformArguments', () => {
assert.deepEqual(
CLUSTER_REPLICAS.transformArguments('0'),
['CLUSTER', 'REPLICAS', '0']
);
});
testUtils.testWithCluster('clusterNode.clusterReplicas', async cluster => {
const client = await cluster.nodeClient(cluster.masters[0]);
assert.equal(
typeof await client.clusterReplicas(cluster.masters[0].id),
'string'
);
}, GLOBAL.CLUSTERS.OPEN);
});