From 5ae39c346d8092f800637e065260feee553378c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Fri, 10 May 2019 09:00:15 +0200 Subject: [PATCH 1/2] Add Node.js 12 to Travis CI platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miroslav Bajtoš --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: From c830161dadc7e1e99d70c4e9940c36793ef54160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Fri, 10 May 2019 09:10:21 +0200 Subject: [PATCH 2/2] Fix tests to correctly assert on MongoNetworkError MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miroslav Bajtoš --- package.json | 2 +- test/mongodb.test.js | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) 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(); }); });