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

[Bug]: Example for cypress_module_test gives false positives. #44

Open
mikelikespie opened this issue Jul 19, 2023 · 0 comments · May be fixed by #45
Open

[Bug]: Example for cypress_module_test gives false positives. #44

mikelikespie opened this issue Jul 19, 2023 · 0 comments · May be fixed by #45
Labels
bug Something isn't working untriaged Requires traige

Comments

@mikelikespie
Copy link

What happened?

Not actually a bug, but error in docs (and tests/module_test/runner.js)
I was following the example snippet for runner for cypress_module_test and noticed it gave false positives when a test failed but nothing else.
If a test failed, result.status === 'finished' and one has to check the failed count, so in addition to checking status, one has to do something like

 if (result.failures) {
      console.error('Some tests failed')
      console.error(result.message)
      process.exit(1)
    }

Version

Development (host) and target OS/architectures:
macos arm

Output of bazel --version:
bazel 6.2.0

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:

v0.2.0 of rules_cypress

cypress_version = "12.3.0",

How to reproduce

Add a failing cypress test to example, and notice it doesn't fail.

Any other information?

No response

@mikelikespie mikelikespie added the bug Something isn't working label Jul 19, 2023
@github-actions github-actions bot added the untriaged Requires traige label Jul 19, 2023
mikelikespie added a commit to mikelikespie/rules_cypress that referenced this issue Jul 25, 2023
The existing runner.js wouldn't exit w/ a non-zero code if either a test
fails, or cypress.run threw an exception. This will handle both cases

Fixes aspect-build#44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged Requires traige
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant