diff --git a/.travis.yml b/.travis.yml index 593b4a1be..cf1c49d92 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: node_js node_js: - - "6" - - "8" + - "12" - "10" + - "8" env: - CXX=g++-4.8 addons: diff --git a/package.json b/package.json index 714323ba4..46771b251 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "bson": "^1.0.6", "debug": "^3.1.0", "loopback-connector": "^4.5.0", - "mongodb": "^3.1.4", + "mongodb": "^3.2.4", "strong-globalize": "^4.1.1" }, "devDependencies": { diff --git a/test/mongodb.test.js b/test/mongodb.test.js index 3e7be7a42..aa80b5e7f 100644 --- a/test/mongodb.test.js +++ b/test/mongodb.test.js @@ -57,7 +57,9 @@ describe('lazyConnect', function() { }); ds.on('error', function(err) { - err.code.should.eql('ECONNREFUSED'); + should.exist(err); + err.name.should.equal('MongoNetworkError'); + err.message.should.match(/ECONNREFUSED/); done(); }); }); @@ -361,8 +363,9 @@ describe('mongodb connector', function() { port: 4, // unassigned by IANA }); ds.ping(function(err) { - (!!err).should.be.True(); - err.code.should.eql('ECONNREFUSED'); + should.exist(err); + err.name.should.equal('MongoNetworkError'); + err.message.should.match(/ECONNREFUSED/); done(); }); });