You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
chore: improve coverage
This commit is contained in:
@@ -43,6 +43,7 @@ function unifyOptions (portArg, hostArg, options) {
|
||||
}
|
||||
if (parsed.search !== '') {
|
||||
for (var elem in parsed.query) {
|
||||
/* istanbul ignore if */
|
||||
if (!Object.prototype.hasOwnProperty.call(parsed.query, elem)) {
|
||||
continue
|
||||
}
|
||||
|
11
lib/multi.js
11
lib/multi.js
@@ -80,10 +80,7 @@ function execTransaction (multi) {
|
||||
err.command = 'EXEC'
|
||||
err.code = 'EXECABORT'
|
||||
return new Promise((resolve, reject) => {
|
||||
utils.replyInOrder(client, (err, res) => {
|
||||
if (err) return reject(err)
|
||||
resolve(res)
|
||||
}, null, [])
|
||||
utils.replyInOrder(client, reject, err)
|
||||
})
|
||||
}
|
||||
const len = queue.length
|
||||
@@ -145,14 +142,14 @@ class Multi {
|
||||
/**
|
||||
* Creates an instance of Multi.
|
||||
* @param {RedisClient} client
|
||||
* @param {any[]} [args]
|
||||
* @param {string} [type]
|
||||
* @param {any[]} [args]
|
||||
*
|
||||
* @memberof Multi
|
||||
*/
|
||||
constructor (client, args, type) {
|
||||
constructor (client, type, args) {
|
||||
this._client = client
|
||||
this._type = typeof type === 'string' ? type : 'multi'
|
||||
this._type = type
|
||||
this._queue = new Queue()
|
||||
// Either undefined or an array. Fail hard if it's not an array
|
||||
if (args) {
|
||||
|
@@ -112,7 +112,7 @@ function toString (arg) {
|
||||
|
||||
function returnErr (client, command) {
|
||||
const err = new TypeError('NodeRedis can not handle the provided arguments (see "error.issues" property).\n\nFurther information https://github.com/asd')
|
||||
err.command = command.name.toUpperCase()
|
||||
err.command = command.command.toUpperCase()
|
||||
err.args = command.args
|
||||
err.issues = errors
|
||||
errors = null
|
||||
|
Reference in New Issue
Block a user