mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 10:35:50 +00:00
* Update ripple-lib api usage * Use latest npm ripple-lib * Tested with bignumber.js branch and tip of develop * Use new version of coffee-script * Better source maps * Update mocha * Add assert-diff for better error reporting * Add rconsole, enabled via USE_RCONSOLE env var * For use with manual installation only
25 lines
609 B
JavaScript
25 lines
609 B
JavaScript
mocha = require("mocha")
|
|
// Stash a reference away to this
|
|
old_loader = mocha.prototype.loadFiles
|
|
|
|
// Optionally use a more useful (but noisy) logger
|
|
if (process.env.USE_RCONSOLE) {
|
|
require('rconsole');
|
|
};
|
|
|
|
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;
|
|
};
|
|
|