expecto
expecto copied to clipboard
Separate exceptions/debug values/values from pretty printing
Expecto Assert Exceptions are hard to read in the debugger
The Expecto Assertions throw exceptions which have color codes in the exception message. Sometimes you see these strings directly instead of via the console however the codes make the message unreadable.
Is there a way to turn colors off for assert exceptions?
It's not something currently supported; it would entail refactoring to more structured messaging and value passing. If you want to have a go at it, it could be rolled into a future release.
Opening again, we want to do this.
I might be able to help, if no one else beats me to it. Where are the messages formatted, I had trouble tracking it down?
The messages are formatted in the Expect.{method} and printed as-is to the logger, so you'll have to refactor all asserts that pretty-print. See the commits of https://github.com/haf/expecto/pull/346
@daniellittledev We've just merged a PR which might be easier to base your own work on, should you wish to pick this up.
@haf thanks, good to know