Should-BeString
: Doesn't handle escape character correctly in error message
#2561
Milestone
Should-BeString
: Doesn't handle escape character correctly in error message
#2561
Checklist
What is the issue?
If the actual value or expected value contain escape character (for example an ANSI sequence) the message are not shown correctly.
Expected Behavior
Should show the special character like escape characters. Also ANSI sequences should not be hidden as they are part of the strings being compared.
Steps To Reproduce
Outputs:
Describe your environment
Possible Solution?
Maybe convert special characters in actual and expected value to their unicode equivalent?
Maybe this should go into the
Format-Nicely
function, so all strings are parsed? 🤔 Otherwise strings in expected and actual could also affect the output in the console (changing colors etc.)Outputs:
The text was updated successfully, but these errors were encountered: