eng - print test failure to renderer console for easy reveal in dev tools

This commit is contained in:
Johannes Rieken
2017-06-06 12:57:46 +02:00
parent e4d76e67e1
commit d03b5e9541

View File

@@ -243,11 +243,19 @@ function runTests(opts) {
mocha.reporter(IPCReporter);
}
mocha.run(() => {
const runner = mocha.run(() => {
createCoverageReport(opts).then(() => {
ipcRenderer.send('all done');
});
});
if (opts.debug) {
runner.on('fail', (test, err) => {
console.error(test.fullTitle());
console.error(err.stack);
});
}
});
}