You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

17 lines
401 B

var assert = require('assert');
var mongojs = require('../index');
var db = mongojs('localhost', ['test']);
process.once('uncaughtException', function(err) {
console.log(err);
assert(err.message === 'I should crash the program');
process.exit(0);
});
db.test.findOne(function() {
throw new Error('I should crash the program');
});
setTimeout(function() {
throw new Error('timeout');
}, 5000);