You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
* fix #1906 - implement BITFIELD_RO * set bitfield_ro min version to 6.2
This commit is contained in:
27
packages/client/lib/commands/BITFIELD_RO.spec.ts
Normal file
27
packages/client/lib/commands/BITFIELD_RO.spec.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { strict as assert } from 'assert';
|
||||
import testUtils, { GLOBAL } from '../test-utils';
|
||||
import { transformArguments } from './BITFIELD_RO';
|
||||
|
||||
describe('BITFIELD RO', () => {
|
||||
testUtils.isVersionGreaterThanHook([6, 2]);
|
||||
|
||||
it('transformArguments', () => {
|
||||
assert.deepEqual(
|
||||
transformArguments('key', [{
|
||||
encoding: 'i8',
|
||||
offset: 0
|
||||
}]),
|
||||
['BITFIELD_RO', 'key', 'GET', 'i8', '0']
|
||||
);
|
||||
});
|
||||
|
||||
testUtils.testWithClient('client.bitFieldRo', async client => {
|
||||
assert.deepEqual(
|
||||
await client.bitFieldRo('key', [{
|
||||
encoding: 'i8',
|
||||
offset: 0
|
||||
}]),
|
||||
[0]
|
||||
);
|
||||
}, GLOBAL.SERVERS.OPEN);
|
||||
});
|
Reference in New Issue
Block a user