rtfeldman / rtfeldman/node-test-runner
Debug on fail
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 140
- Forks
- 83
- Avg merge
- 8h 25m
- Merged PRs (30d)
- 5
Description
A pretty neat feature would be a new flag, that would run the test as usual. However, when there would be a failure, it would:
- shrink it as usual
- pause execution
- print the failure message
- open an elm repl
- reexecute the test in the repl (with the shrunk data)
This would drop you nicely into the repl with everything going on in the test in scope. This comes from a workflow, where one would write a complex fuzz test, run it for say 10000 iterations. This can find some fairly obscure bugs, so one would like to be able to inspect the intermediate data structures, and even run some experiments in the console, however this can be hard to achieve with just the test output and time consuming to set up.
A nice further refinement would be that one could enter this mode after a run in watch mode by pressing say the D key, which would be a nice way to combine this with watch mode.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests; begin by tracing the test-runner flag handling and its watch-mode interaction. Implement the described failure flow around shrinking, pausing, printing the failure, and opening an Elm REPL with the shrunk data, then verify it with focused runner tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100