Skip to content

Commit

Permalink
Merge pull request #1851 from storybooks/exit-1-smoke-tests
Browse files Browse the repository at this point in the history
Exit with code 1 if `start-storybook --smoke-test` fails
  • Loading branch information
Hypnosphi authored Sep 15, 2017
2 parents f93c4e1 + 771c72d commit fa3adf6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion app/react/src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,9 @@ Promise.all([webpackValid, serverListening])
process.exit(0);
}
})
.catch(error => logger.error(error));
.catch(error => {
logger.error(error);
if (program.smokeTest) {
process.exit(1);
}
});
7 changes: 6 additions & 1 deletion app/vue/src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,9 @@ Promise.all([webpackValid, serverListening])
process.exit(0);
}
})
.catch(error => logger.error(error));
.catch(error => {
logger.error(error);
if (program.smokeTest) {
process.exit(1);
}
});

0 comments on commit fa3adf6

Please sign in to comment.