aspect-build / aspect-build/rules_cypress
[Bug]: Example for cypress_module_test gives false positives.
- Dominant language
- Starlark
- Stars
- 12
- Forks
- 15
- Avg merge
- 41m
- Merged PRs (30d)
- 11
Description
### 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
```shell
Add a failing cypress test to example, and notice it doesn't fail.
```
### Any other information?
_No response_
Contributor guide
Research direction
Start with tests/module_test/runner.js and the cypress_module_test example referenced in the issue. Reproduce the problem by adding a failing Cypress test, then verify that the runner and documented example distinguish a failed test from a finished run and that the failing test causes a non-successful result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cypress, javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 30/100