You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-19 07:02:06 +03:00
add some missing commands
This commit is contained in:
26
lib/commands/SETBIT.spec.ts
Normal file
26
lib/commands/SETBIT.spec.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
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
|
||||
);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user