NodeRedis/node-redis

View on GitHub
packages/client/lib/commands/CLUSTER_DELSLOTS.spec.ts

Summary

Maintainability
A
3 hrs
Test Coverage
import { strict as assert } from 'node:assert';
import CLUSTER_DELSLOTS from './CLUSTER_DELSLOTS';
import { parseArgs } from './generic-transformers';

describe('CLUSTER DELSLOTS', () => {
  describe('transformArguments', () => {
    it('single', () => {
      assert.deepEqual(
        parseArgs(CLUSTER_DELSLOTS, 0),
        ['CLUSTER', 'DELSLOTS', '0']
      );
    });

    it('multiple', () => {
      assert.deepEqual(
        parseArgs(CLUSTER_DELSLOTS, [0, 1]),
        ['CLUSTER', 'DELSLOTS', '0', '1']
      );
    });
  });
});