Print out main process logs if electron unit tests fail
This commit is contained in:
parent
e2d044e02b
commit
9e0f387e80
1 changed files with 13 additions and 1 deletions
14
Gruntfile.js
14
Gruntfile.js
|
@ -380,7 +380,19 @@ module.exports = function(grunt) {
|
|||
// We need to use the failure variable and this early stop to clean up before
|
||||
// shutting down. Grunt's fail methods are the only way to set the return value,
|
||||
// but they shut the process down immediately!
|
||||
return app.stop();
|
||||
if (failure) {
|
||||
console.log();
|
||||
console.log('Main process logs:');
|
||||
return app.client.getMainProcessLogs().then(function(logs) {
|
||||
logs.forEach(function(log) {
|
||||
console.log(log);
|
||||
});
|
||||
|
||||
return app.stop();
|
||||
});
|
||||
} else {
|
||||
return app.stop();
|
||||
}
|
||||
})
|
||||
.then(function() {
|
||||
if (failure) {
|
||||
|
|
Loading…
Add table
Reference in a new issue