Skip to content

Commit aae6fd6

Browse files
Sebmasterdomenic
authored andcommitted
Test if querySelector succeeds on incomplete docs
Fixes jsdom#523.
1 parent 1d297e6 commit aae6fd6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/jsdom/parsing.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,11 @@ exports["parsing of pre tag with < and > characters (GH-755)"] = function (t) {
263263

264264
t.done();
265265
};
266+
267+
exports["querySelector should not throw when applied to Document fragments (GH-523)"] = function (t) {
268+
var doc = jsdom("<a href='http://foo'></a>");
269+
270+
t.strictEqual(doc.querySelector("[href]").tagName, "A");
271+
272+
t.done();
273+
};

0 commit comments

Comments
 (0)