Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update the error message and name #561

Merged
merged 1 commit into from Jan 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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