Skip to content

HTML reporter fails if some Unicode characters are in use, causing tests to stop running #1893

Open

Description

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    area: browserbrowser-specificarea: reportersinvolving a specific reporterstatus: accepting prsMocha can use your help with this one!type: buga defect, confirmed by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions