You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
Upgrade node and dependencies (#1578)
* upgrade workflow actions
* fix setup-node version
* change redis-64 version to 3.0.503
* fix "no password is set" for redis6,
fix tests to work with redis6,
add redis6 to workflows
* do not use assert.match (was added only at v13.6.0 & v12.16.0)
* fix errors.subscribeUnsubscribeOnly regex
* fix invaliodPassword typo
* send --save "" to redis-server in tests
* upgrade dependencies, set node minimum version to 10, use current LTS versions in tests and benchmark workflows
* change windows tests too
* revert mocha back to ^4.1.0
* fix for f5528504a0
- revert mocha back to ^4.1.0
* fix some tests and upgrade mocha
* fix two more tests
* try to fix tests in windows
* upgrade denque and redis-commands
ref #1575
* replace `new Buffer` (deprecated) with `Buffer.from`
* Buffer.from(0) should be Buffer.alloc(0)
This commit is contained in:
@@ -50,7 +50,6 @@ describe("The 'hgetall' method", function () {
|
||||
});
|
||||
|
||||
describe('binary client', function () {
|
||||
var client;
|
||||
var args = config.configureClient(ip, {
|
||||
return_buffers: true
|
||||
});
|
||||
@@ -63,14 +62,14 @@ describe("The 'hgetall' method", function () {
|
||||
});
|
||||
|
||||
it('returns binary results', function (done) {
|
||||
client.hmset(['bhosts', 'mjr', '1', 'another', '23', 'home', '1234', new Buffer([0xAA, 0xBB, 0x00, 0xF0]), new Buffer([0xCC, 0xDD, 0x00, 0xF0])], helper.isString('OK'));
|
||||
client.hmset(['bhosts', 'mjr', '1', 'another', '23', 'home', '1234', Buffer.from([0xAA, 0xBB, 0x00, 0xF0]), Buffer.from([0xCC, 0xDD, 0x00, 0xF0])], helper.isString('OK'));
|
||||
client.HGETALL('bhosts', function (err, obj) {
|
||||
assert.strictEqual(4, Object.keys(obj).length);
|
||||
assert.strictEqual('1', obj.mjr.toString());
|
||||
assert.strictEqual('23', obj.another.toString());
|
||||
assert.strictEqual('1234', obj.home.toString());
|
||||
assert.strictEqual((new Buffer([0xAA, 0xBB, 0x00, 0xF0])).toString('binary'), Object.keys(obj)[3]);
|
||||
assert.strictEqual((new Buffer([0xCC, 0xDD, 0x00, 0xF0])).toString('binary'), obj[(new Buffer([0xAA, 0xBB, 0x00, 0xF0])).toString('binary')].toString('binary'));
|
||||
assert.strictEqual((Buffer.from([0xAA, 0xBB, 0x00, 0xF0])).toString('binary'), Object.keys(obj)[3]);
|
||||
assert.strictEqual((Buffer.from([0xCC, 0xDD, 0x00, 0xF0])).toString('binary'), obj[(Buffer.from([0xAA, 0xBB, 0x00, 0xF0])).toString('binary')].toString('binary'));
|
||||
return done(err);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user