Skip to content

Commit

Permalink
fix: update the error message and name
Browse files Browse the repository at this point in the history
  • Loading branch information
jannyHou committed Jan 20, 2020
1 parent 08c7314 commit 4f2d3af
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/mongodb.test.js
Expand Up @@ -59,8 +59,8 @@ describe('connect', function() {

ds.on('error', function(err) {
should.exist(err);
err.name.should.equalOneOf('MongoNetworkError', 'MongoTimeoutError');
err.message.should.match(/Server selection timed out/);
err.name.should.equalOneOf('MongoServerSelectionError', 'MongoNetworkError', 'MongoTimeoutError');
err.message.should.match(/connect ECONNREFUSED/);
done();
});
});
Expand All @@ -73,8 +73,8 @@ describe('connect', function() {

ds.on('error', function(err) {
should.exist(err);
err.name.should.equalOneOf('MongoNetworkError', 'MongoTimeoutError');
err.message.should.match(/Server selection timed out/);
err.name.should.equalOneOf('MongoServerSelectionError', 'MongoNetworkError', 'MongoTimeoutError');
err.message.should.match(/connect ECONNREFUSED/);
done();
});
});
Expand Down Expand Up @@ -384,8 +384,8 @@ describe('mongodb connector', function() {
});
ds.ping(function(err) {
should.exist(err);
err.name.should.equalOneOf('MongoNetworkError', 'MongoTimeoutError');
err.message.should.match(/Server selection timed out/);
err.name.should.equalOneOf('MongoServerSelectionError', 'MongoNetworkError', 'MongoTimeoutError');
err.message.should.match(/connect ECONNREFUSED/);
done();
});
});
Expand Down

0 comments on commit 4f2d3af

Please sign in to comment.