Add Test.RunnerV2 module - #260
Draft
lydell wants to merge 58 commits into
Draft
Conversation
…andom run instead
…eeds indexing anyway
jfmengels
reviewed
Aug 16, 2026
jfmengels
reviewed
Aug 17, 2026
jfmengels
approved these changes
Aug 17, 2026
jfmengels
left a comment
Contributor
There was a problem hiding this comment.
Looks very good to me, great work!
I left a bunch of improvement suggestions, but none are blocking.
|
|
||
|
|
||
| wrapWithTryCatch : (a -> Expectation) -> (a -> Expectation) | ||
| wrapWithTryCatch getExpectation = |
Contributor
There was a problem hiding this comment.
Is wrapWithTryCatch mostly a rename of what was done before, in order to make it clearer what's happening?
Contributor
Author
There was a problem hiding this comment.
Previously, the thunks weren’t “stored with a try-catch wrapper” (like I changed them to) – instead, when running a test thunk that happened in a try-catch. This doesn’t work with my new, more detailed fuzz test failures, though. Catching errors so late means that it’s much more trouble constructing a FuzzTestFailData. Whereas if we wrap early we get everything for free.
(Not sure if this explanation made sense at all.)
Co-authored-by: Jeroen Engels <jfm.engels@gmail.com>
Not possible to test right now since running tests returns a Task now. Might figure out some other way to test later if it feels important.
This reverts commit 61ce974.
Conflicts: tests/src/Tests.elm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This deprecates the
Test.Runnermodule and addsTest.RunnerV2. This is a backwards-compatible change.node-test-runner PR: rtfeldman/node-test-runner#686. The idea is to require a recent enough version of elm-explorations/test in node-test-runner (updating the package in projects is a no-brainer), but keep compatibility in this package, so we don’t leave elm-test-rs behind.
Changes in
Test.RunnerV2:DistributionReportfor unit tests, while in practice you can’t, for example.Debug.logso that they can be displayed together with the test that made them. For unit tests, only the debug logs from the run that caused a fuzz test to fail is collected. (We ignoreDebug.logfrom exploratory runs). Closes Proof of concept: allow Debug.log in fuzz tests #156. Closes capture Debug.log and present it with a failing test #154. Related: Capture Debug.log rtfeldman/node-test-runner#400RandomRun) from a previous failure, allowing for an instant reproduction of a fuzz test failure. Related: Quick way to debug failing fuzz tests rtfeldman/node-test-runner#327