node.js - Mocha fails with no string diff, utf-8? -


I have a failed exam that produces my strings with "real" and "expected" highlighting. .

no highlighting

after killing some heads , I think I have determined that in my actual string there are some weird UTF-8 characters that are completely hidden from me, and not to highlight them Know not.

I have shown it in my required and actual value for raw text files written out and they are loaded, indicating that they are different due to highlighting which shows spaces between words .

Enter image details here

I utf8 Tried to load the library (at NPM) and utf8.encode str , and it still failed, but now the letters appear as something more than empty space , And Mocha highlights:

Highlighting some

But by any means, my tests are failing

BTW, I use my test The string of comparison to be seen looks like this:

comparison string

Ensure that your text editors are either saving your source code as the appropriate UTF-8, or To avoid those copied / pasted characters, literally escoled literals @loganfsmyth as well as commented.

Comments