Description
openedon Sep 16, 2015
I was working on a project that ran test vectors of the IdnaTest.txt Unicode data file, and I noticed that when certain Unicode characters were in use, the HTML reporter (but not the standard node.js reporters) would stop working properly. An example of such a test case is:
test('T; 퀬-\uDF7E\uD9AE\uDD23.\u200C\uD804\uDD33\uD95B\uDF38𝟤; [P1 V6 C1]; [P1 V6 V5 A3]', function () {
assert.throws(function () { toUnicode("퀬-\uDF7E\uD9AE\uDD23.\u200C\uD804\uDD33\uD95B\uDF38𝟤", true); });
assert.throws(function () { toAscii("퀬-\uDF7E\uD9AE\uDD23.\u200C\uD804\uDD33\uD95B\uDF38𝟤", true); });
});
After laboriously trying to catch it in a debugger (I originally found this in a test case where I dynamically generated the functions, so I had to first write another preprocessing step to dump code to a file), I found that the problem was that there was a URIError that was thrown. Unfortunately, I don't have the exact error message or its exact location.
While I do understand that using random Unicode is likely to cause lots of issues, it would be nice to see the actual characters involved for debugging purposes, so I do like using crazy raw test names if possible.