1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

some more commands

This commit is contained in:
Leibale
2023-04-30 10:08:25 -04:00
parent 2c4dc95a44
commit 53b9397a78
8 changed files with 259 additions and 243 deletions

View File

@@ -1,26 +1,22 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './SETBIT';
import SETBIT from './SETBIT';
describe('SETBIT', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 0, 1),
['SETBIT', 'key', '0', '1']
);
});
it('transformArguments', () => {
assert.deepEqual(
SETBIT.transformArguments('key', 0, 1),
['SETBIT', 'key', '0', '1']
);
});
testUtils.testWithClient('client.setBit', async client => {
assert.equal(
await client.setBit('key', 0, 1),
0
);
}, GLOBAL.SERVERS.OPEN);
testUtils.testWithCluster('cluster.setBit', async cluster => {
assert.equal(
await cluster.setBit('key', 0, 1),
0
);
}, GLOBAL.CLUSTERS.OPEN);
testUtils.testAll('setBit', async client => {
assert.equal(
await client.setBit('key', 0, 1),
0
);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});