Skip to content

Commit

Permalink
test: remove flakey test re: #8209
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Oct 16, 2019
1 parent 5176c29 commit 8b4bcd0
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions test/connection.test.js
Expand Up @@ -1074,33 +1074,6 @@ describe('connections:', function() {
done();
});
});
describe('when only username is defined', function() {
let listeners;

beforeEach(function() {
listeners = process.listeners('uncaughtException');
process.removeAllListeners('uncaughtException');
});

afterEach(function() {
process.on('uncaughtException', listeners[0]);
});

it('should return true', function(done) {
const db = mongoose.createConnection();
db.openUri('mongodb://localhost:27017/fake', {
user: 'user'
});
process.once('uncaughtException', err => {
err.uncaught = false;
assert.ok(err.message.includes('password must be a string'));
done();
});

assert.equal(db.shouldAuthenticate(), true);
db.close(done);
});
});
describe('when both username and password are defined', function() {
it('should return true', function(done) {
const db = mongoose.createConnection('mongodb://localhost:27017/fake', {
Expand Down

0 comments on commit 8b4bcd0

Please sign in to comment.