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