Reorganized test and force 100% code coverage (#1226)

This commit is contained in:
Tomas Della Vedova
2020-06-15 08:37:04 +02:00
committed by delvedor
parent acce06c2af
commit 24961869cc
16 changed files with 183 additions and 30 deletions

View File

@ -52,6 +52,7 @@ class BaseConnectionPool {
}
if (opts.ssl == null) opts.ssl = this._ssl
/* istanbul ignore else */
if (opts.agent == null) opts.agent = this._agent
const connection = new this.Connection(opts)
@ -201,6 +202,7 @@ class BaseConnectionPool {
}
address = address.slice(0, 4) === 'http'
/* istanbul ignore next */
? address
: `${protocol}//${address}`
const roles = node.roles.reduce((acc, role) => {

View File

@ -7,7 +7,7 @@
const BaseConnectionPool = require('./BaseConnectionPool')
class CloudConnectionPool extends BaseConnectionPool {
constructor (opts = {}) {
constructor (opts) {
super(opts)
this.cloudConnection = null
}

View File

@ -11,7 +11,7 @@ const Connection = require('../Connection')
const noop = () => {}
class ConnectionPool extends BaseConnectionPool {
constructor (opts = {}) {
constructor (opts) {
super(opts)
this.dead = []