From b61a5529cdb2f0bd6957ad4dedba99d3d81509eb Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Sat, 27 Dec 2014 18:43:45 -0500 Subject: [PATCH] Fix #972 by upgrading nwmatcher --- package.json | 2 +- test/jsdom/selectors.js | 14 ++++++++++++++ test/runner | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 test/jsdom/selectors.js diff --git a/package.json b/package.json index 00d5adbb22..0607411f9f 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "cssom": ">= 0.3.0 < 0.4.0", "cssstyle": ">= 0.2.21 < 0.3.0", "htmlparser2": ">= 3.7.3 < 4.0.0", - "nwmatcher": ">= 1.3.3 < 2.0.0", + "nwmatcher": ">= 1.3.4 < 2.0.0", "parse5": ">= 1.2.0 < 2.0.0", "request": ">= 2.44.0 < 3.0.0", "xmlhttprequest": ">= 1.6.0 < 2.0.0", diff --git a/test/jsdom/selectors.js b/test/jsdom/selectors.js new file mode 100644 index 0000000000..5eec6c1027 --- /dev/null +++ b/test/jsdom/selectors.js @@ -0,0 +1,14 @@ +"use strict"; + +var jsdom = require("../..").jsdom; + +// These tests are mostly random regression tests, not systematic parsing tests. They are compiled from the bug tracker. +exports["div:last-child > span[title] (GH-972)"] = function (t) { + var document = jsdom("
text
"); + + t.doesNotThrow(function () { + document.firstChild.querySelector("div:last-child > span[title]"); + }); + + t.done(); +}; diff --git a/test/runner b/test/runner index 75e4622ee1..8ec63561cd 100755 --- a/test/runner +++ b/test/runner @@ -61,6 +61,7 @@ var files = [ "jsdom/utils.js", "jsdom/namespaces.js", "jsdom/xml.js", + "jsdom/selectors.js", "jsonp/jsonp.js", "browser/css.js",