deno_std icon indicating copy to clipboard operation
deno_std copied to clipboard

assertNotEquals assertion error message discrepancy

Open se-u opened this issue 1 year ago • 2 comments

There is an issue with the assertNotEquals output int the current version of the library. The assertion error message does not reflect the expected string values accurately. Specifically, the following test case:

assertNotEquals('1','1');

is expected to throw an error with the message:

AssertionError: Expected actual: '1' not to be: '1'.

However, the current output is: AssertionError: Expected actual: 1 not to be: 1.

Environment

  • OS: MacOS 12
  • deno version: 1.44.0
  • std version: 0.226.0

se-u avatar Jun 04 '24 12:06 se-u

I'm happy to add quotes to strings for this function. WDYT, @kt3k?

iuioiua avatar Jun 05 '24 08:06 iuioiua

The suggestion makes sense to me. Maybe we should use format of std/internal to make the expression?

kt3k avatar Jun 05 '24 13:06 kt3k