Skip to content

Commit 3d46ebb

Browse files
committed
Test for errors on invalid chinese tags
Fixes jsdom#719.
1 parent aa46500 commit 3d46ebb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/jsdom/parsing.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,16 @@ exports["Parsing of single <html> tag (GH-827)"] = function (t) {
168168

169169
t.done();
170170
};
171+
172+
exports["Don't error on invalid chinese tags (GH-719)"] = function (t) {
173+
jsdom.env({
174+
html: "<div>chinese here:<中文></div>",
175+
done: function (errs, window) {
176+
t.ifError(errs);
177+
178+
t.strictEqual(window.document.body.innerHTML, "<div>chinese here:&lt;中文&gt;</div>");
179+
180+
t.done();
181+
}
182+
});
183+
};

0 commit comments

Comments
 (0)