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:
@@ -21,24 +21,24 @@ describe("The 'hset' method", function () {
|
||||
});
|
||||
|
||||
it('allows a value to be set in a hash', function (done) {
|
||||
var field = new Buffer('0123456789');
|
||||
var value = new Buffer('abcdefghij');
|
||||
var field = Buffer.from('0123456789');
|
||||
var value = Buffer.from('abcdefghij');
|
||||
|
||||
client.hset(hash, field, value, helper.isNumber(1));
|
||||
client.HGET(hash, field, helper.isString(value.toString(), done));
|
||||
});
|
||||
|
||||
it('handles an empty value', function (done) {
|
||||
var field = new Buffer('0123456789');
|
||||
var value = new Buffer(0);
|
||||
var field = Buffer.from('0123456789');
|
||||
var value = Buffer.alloc(0);
|
||||
|
||||
client.HSET(hash, field, value, helper.isNumber(1));
|
||||
client.HGET([hash, field], helper.isString('', done));
|
||||
});
|
||||
|
||||
it('handles empty key and value', function (done) {
|
||||
var field = new Buffer(0);
|
||||
var value = new Buffer(0);
|
||||
var field = Buffer.alloc(0);
|
||||
var value = Buffer.alloc(0);
|
||||
client.HSET([hash, field, value], function (err, res) {
|
||||
assert.strictEqual(res, 1);
|
||||
client.HSET(hash, field, value, helper.isNumber(0, done));
|
||||
@@ -60,7 +60,7 @@ describe("The 'hset' method", function () {
|
||||
it('does not error when a buffer and date are set as values on the same hash', function (done) {
|
||||
var hash = 'test hash';
|
||||
var field1 = 'buffer';
|
||||
var value1 = new Buffer('abcdefghij');
|
||||
var value1 = Buffer.from('abcdefghij');
|
||||
var field2 = 'date';
|
||||
var value2 = new Date();
|
||||
|
||||
@@ -70,7 +70,7 @@ describe("The 'hset' method", function () {
|
||||
it('does not error when a buffer and date are set as fields on the same hash', function (done) {
|
||||
var hash = 'test hash';
|
||||
var value1 = 'buffer';
|
||||
var field1 = new Buffer('abcdefghij');
|
||||
var field1 = Buffer.from('abcdefghij');
|
||||
var value2 = 'date';
|
||||
var field2 = new Date();
|
||||
|
||||
|
Reference in New Issue
Block a user