You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In elm-review's testing library, I try to print out helpful failure messages when a test fails. Sometimes that includes code extracts.
FIXEDCODEMISMATCHI found a different fixed source code than expected for the error with the
following message:
`Let value was declared prematurely`
I expected the following result after the fixes have been applied:""" module A exposing (..) a b c d = let y = 1 in if DIFFERENT then let z = {a = 1} in {z | a = 2} else {a = 3}"""
but I found:""" module A exposing (..) a b c d = let y = 1 in if b then let z = {a = 1} in {z | a = 2} else {a = 3}"""
I would love to be able to have users (including myself) copy-paste the code excerpts from the failure message, unfortunately, they are indented. Half because of me (to separate from the rest, but I could remove this), but mostly because elm-test indents all failure messages by 4 spaces anyway.
I would like to be able to have the option to disable the indentation, possibly by specifying it as an argument on Expect.onFail (and eventual friends from #239).
Here's an example of a potential API :
some operation
|>Expect.equal x
|>Expect.onFail { indent =False}"Some explanation..."
Note: From a rough search, I think the indentation happens in the CLI (here), so it might be necessary to modify the CLI as well.
The text was updated successfully, but these errors were encountered:
In
elm-review
's testing library, I try to print out helpful failure messages when a test fails. Sometimes that includes code extracts.I would love to be able to have users (including myself) copy-paste the code excerpts from the failure message, unfortunately, they are indented. Half because of me (to separate from the rest, but I could remove this), but mostly because
elm-test
indents all failure messages by 4 spaces anyway.I would like to be able to have the option to disable the indentation, possibly by specifying it as an argument on
Expect.onFail
(and eventual friends from #239).Here's an example of a potential API :
Note: From a rough search, I think the indentation happens in the CLI (here), so it might be necessary to modify the CLI as well.
The text was updated successfully, but these errors were encountered: