Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: exit code is 1 when expectations are not fulfilled #194

Merged
merged 2 commits into from
Oct 12, 2018

Conversation

GuillaumeAmat
Copy link
Contributor

Fix #193

A bit of refact of the start method, in order to return 1 as the exit code when expectations have errors.

@GuillaumeAmat
Copy link
Contributor Author

@denar90 My PR is working well as you can see. The Travis job is failing due to the set expectations ^^

Can I raise them a bit?

@denar90
Copy link
Collaborator

denar90 commented Oct 10, 2018

Hi @GuillaumeAmat. The reason we don't fail when expectations haven't met because users might run several pages in one process. If the first page fails, the process will exit and other pages will be skipped.
You will be able to handle this stuff manually in your code when #188 will be done.

@GuillaumeAmat
Copy link
Contributor Author

Oh, I understand. But as #188 helps to fill the gap, it not makes it easier to achieve :/

In my use case, all my pages are tested concurrently in parallel CI jobs. It is more efficient IMHO. But anyway, an easy way to fail the CI would be much appreciated.

What about a new option? Eg: --fail-on-error

@denar90
Copy link
Collaborator

denar90 commented Oct 10, 2018

Oh, I see. --fail-on-error will be nice to have. Good idea!

@GuillaumeAmat
Copy link
Contributor Author

Done :)

@GuillaumeAmat
Copy link
Contributor Author

@denar90 Do you know when you (or someone else) will be able to merge it (if it is ok) and release it?

@denar90
Copy link
Collaborator

denar90 commented Oct 12, 2018 via email

lib/index.ts Show resolved Hide resolved
@denar90 denar90 merged commit 3fab174 into paulirish:master Oct 12, 2018
@denar90
Copy link
Collaborator

denar90 commented Oct 12, 2018

Published 💥

@GuillaumeAmat
Copy link
Contributor Author

Thanks! 🤗

@sejoker
Copy link

sejoker commented Oct 15, 2018

exactly what I needed, thanks for landing this.

@GuillaumeAmat GuillaumeAmat deleted the exit-1-on-error branch October 15, 2018 08:38
@GuillaumeAmat
Copy link
Contributor Author

You're welcome @sejoker ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants