Skip to content

Commit 11968a1

Browse files
committed
Test handling of whitespace after doctype
Fixes jsdom#160.
1 parent 0d9fc6e commit 11968a1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/jsdom/parsing.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,12 @@ exports[".innerHTML with < character (GH-652)"] = function (t) {
242242
}
243243
});
244244
};
245+
246+
exports["whitespace after <!DOCTYPE> (GH-160)"] = function (t) {
247+
var doc = jsdom("<!DOCTYPE html>\n<html></html>");
248+
249+
var firstChild = doc.firstChild;
250+
t.strictEqual(firstChild.nodeName, "html");
251+
252+
t.done();
253+
};

0 commit comments

Comments
 (0)