1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
node-redis/lib/commands/SETBIT.spec.ts
2021-07-13 19:35:07 -04:00

27 lines
746 B
TypeScript

import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster } from '../test-utils';
import { transformArguments } from './SETBIT';
describe('SETBIT', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 0, 1),
['SETBIT', 'key', '0', '1']
);
});
itWithClient(TestRedisServers.OPEN, 'client.setBit', async client => {
assert.equal(
await client.setBit('key', 0, 1),
0
);
});
itWithCluster(TestRedisClusters.OPEN, 'cluster.setBit', async cluster => {
assert.equal(
await cluster.setBit('key', 0, 1),
0
);
});
});