|
1 | 1 | import { strict as assert } from 'assert';
|
2 | 2 | import testUtils, { GLOBAL } from '../test-utils';
|
3 |
| -import { transformArguments } from './BITCOUNT'; |
| 3 | +import BITCOUNT from './BITCOUNT'; |
4 | 4 |
|
5 | 5 | describe('BITCOUNT', () => {
|
6 |
| - describe('transformArguments', () => { |
7 |
| - it('simple', () => { |
8 |
| - assert.deepEqual( |
9 |
| - transformArguments('key'), |
10 |
| - ['BITCOUNT', 'key'] |
11 |
| - ); |
12 |
| - }); |
| 6 | + describe('transformArguments', () => { |
| 7 | + it('simple', () => { |
| 8 | + assert.deepEqual( |
| 9 | + BITCOUNT.transformArguments('key'), |
| 10 | + ['BITCOUNT', 'key'] |
| 11 | + ); |
| 12 | + }); |
13 | 13 |
|
14 |
| - describe('with range', () => { |
15 |
| - it('simple', () => { |
16 |
| - assert.deepEqual( |
17 |
| - transformArguments('key', { |
18 |
| - start: 0, |
19 |
| - end: 1 |
20 |
| - }), |
21 |
| - ['BITCOUNT', 'key', '0', '1'] |
22 |
| - ); |
23 |
| - }); |
| 14 | + describe('with range', () => { |
| 15 | + it('simple', () => { |
| 16 | + assert.deepEqual( |
| 17 | + BITCOUNT.transformArguments('key', { |
| 18 | + start: 0, |
| 19 | + end: 1 |
| 20 | + }), |
| 21 | + ['BITCOUNT', 'key', '0', '1'] |
| 22 | + ); |
| 23 | + }); |
24 | 24 |
|
25 |
| - it('with mode', () => { |
26 |
| - assert.deepEqual( |
27 |
| - transformArguments('key', { |
28 |
| - start: 0, |
29 |
| - end: 1, |
30 |
| - mode: 'BIT' |
31 |
| - }), |
32 |
| - ['BITCOUNT', 'key', '0', '1', 'BIT'] |
33 |
| - ); |
34 |
| - }); |
35 |
| - }); |
| 25 | + it('with mode', () => { |
| 26 | + assert.deepEqual( |
| 27 | + BITCOUNT.transformArguments('key', { |
| 28 | + start: 0, |
| 29 | + end: 1, |
| 30 | + mode: 'BIT' |
| 31 | + }), |
| 32 | + ['BITCOUNT', 'key', '0', '1', 'BIT'] |
| 33 | + ); |
| 34 | + }); |
36 | 35 | });
|
| 36 | + }); |
37 | 37 |
|
38 |
| - testUtils.testWithClient('client.bitCount', async client => { |
39 |
| - assert.equal( |
40 |
| - await client.bitCount('key'), |
41 |
| - 0 |
42 |
| - ); |
43 |
| - }, GLOBAL.SERVERS.OPEN); |
| 38 | + testUtils.testAll('bitCount', async client => { |
| 39 | + assert.equal( |
| 40 | + await client.bitCount('key'), |
| 41 | + 0 |
| 42 | + ); |
| 43 | + }, { |
| 44 | + client: GLOBAL.SERVERS.OPEN, |
| 45 | + cluster: GLOBAL.CLUSTERS.OPEN |
| 46 | + }); |
44 | 47 | });
|
0 commit comments