Files
rippled/test/mocha-loader-patch.js
Nicholas Dudfield e14c700c60 New integration tests:
* New tests for autobridging and freeze
* Discrepancy detection tests
* Don't let Mocha suppress load time errors
2014-06-28 18:27:33 -07:00

20 lines
499 B
JavaScript

mocha = require("mocha")
// Stash a reference away to this
old_loader = mocha.prototype.loadFiles
if (!old_loader.monkey_patched) {
// Gee thanks Mocha ...
mocha.prototype.loadFiles = function() {
try {
old_loader.apply(this, arguments);
} catch (e) {
// Normally mocha just silently bails
console.error(e.stack);
// We throw, so mocha doesn't continue trying to run the test suite
throw e;
}
}
mocha.prototype.loadFiles.monkey_patched = true;
};