From 2b6ee261e97c1e1544b14a9c73de90d0a4c8dae3 Mon Sep 17 00:00:00 2001
From: Jessica Janiuk <72768744+jessicajaniuk@users.noreply.github.com>
Date: Tue, 21 Feb 2023 15:34:25 -0800
Subject: [PATCH] test: Fix broken tests and disable some (#5)
Also renamed blocklist to more appropriate name
---
CHANGELOG.md | 2 -
README.md | 3 -
package-lock.json | 897 +++++++++++-------
test/domino.js | 55 +-
test/html5lib-tests.json | 6 +-
test/w3c/harness/index.js | 6 +-
...klist.json => web-platform-blocklist.json} | 0
test/web-platform-tests.js | 88 +-
8 files changed, 662 insertions(+), 395 deletions(-)
rename test/{web-platform-blacklist.json => web-platform-blocklist.json} (100%)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3b07092..103a147 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -129,8 +129,6 @@
`Element#removeAttribute`/`Element#removeAttributeNS`. (#90, @clint-tseng)
* Fix deep `Document#importNode`. (#93)
* Ensure that `Node#parentNode` is `null` (not `undefined`) when removed.
-* Add an optional second argument to `domino.createWindow` to specify
- the document's address.
* Tweak JavaScript properties which are DOM reflections of element
attributes in order to more closely match the DOM 4 spec.
* Implement `ChildNode#before()`, `ChildNode#after()`, and
diff --git a/README.md b/README.md
index 82f51f4..3a247e7 100644
--- a/README.md
+++ b/README.md
@@ -57,9 +57,6 @@ The only exception is the initial creation of a document:
var domino = require('domino');
var Element = domino.impl.Element; // etc
-var window = domino.createWindow('
Hello world ', 'http://example.com');
-var document = window.document;
-
// alternatively: document = domino.createDocument(htmlString, true)
var h1 = document.querySelector('h1');
diff --git a/package-lock.json b/package-lock.json
index 0adc94d..61c5139 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,277 +1,322 @@
{
"name": "domino",
- "version": "2.1.6",
- "lockfileVersion": 1,
+ "version": "2.1.6+git",
+ "lockfileVersion": 3,
"requires": true,
- "dependencies": {
- "ansi-colors": {
+ "packages": {
+ "": {
+ "name": "domino",
+ "version": "2.1.6+git",
+ "license": "BSD-2-Clause",
+ "devDependencies": {
+ "jquery": "^3.5.1",
+ "jshint": "^2.11.1",
+ "mocha": "^6.2.3",
+ "should": "^13.2.3"
+ }
+ },
+ "node_modules/ansi-colors": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
"integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
},
- "ansi-regex": {
+ "node_modules/ansi-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
},
- "ansi-styles": {
+ "node_modules/ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
- "requires": {
+ "dependencies": {
"color-convert": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=4"
}
},
- "argparse": {
+ "node_modules/argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"dev": true,
- "requires": {
+ "dependencies": {
"sprintf-js": "~1.0.2"
}
},
- "balanced-match": {
+ "node_modules/balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
- "brace-expansion": {
+ "node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
- "requires": {
+ "dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
- "browser-stdout": {
+ "node_modules/browser-stdout": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
"integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
"dev": true
},
- "camelcase": {
+ "node_modules/camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
},
- "chalk": {
+ "node_modules/chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
},
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/chalk/node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
"dependencies": {
- "supports-color": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
- "dev": true,
- "requires": {
- "has-flag": "^3.0.0"
- }
- }
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
}
},
- "cli": {
+ "node_modules/cli": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz",
"integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=",
"dev": true,
- "requires": {
+ "dependencies": {
"exit": "0.1.2",
"glob": "^7.1.1"
+ },
+ "engines": {
+ "node": ">=0.2.5"
}
},
- "cliui": {
+ "node_modules/cliui": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
"integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
"dev": true,
- "requires": {
+ "dependencies": {
"string-width": "^3.1.0",
"strip-ansi": "^5.2.0",
"wrap-ansi": "^5.1.0"
+ }
+ },
+ "node_modules/cliui/node_modules/ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/cliui/node_modules/string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "dev": true,
+ "dependencies": {
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
},
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/cliui/node_modules/strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
"dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
- "dev": true
- },
- "string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
- "dev": true,
- "requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
- }
- },
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
- "dev": true,
- "requires": {
- "ansi-regex": "^4.1.0"
- }
- }
- }
- },
- "color-convert": {
+ "ansi-regex": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
- "requires": {
+ "dependencies": {
"color-name": "1.1.3"
}
},
- "color-name": {
+ "node_modules/color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
- "concat-map": {
+ "node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
- "console-browserify": {
+ "node_modules/console-browserify": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
"integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=",
"dev": true,
- "requires": {
+ "dependencies": {
"date-now": "^0.1.4"
}
},
- "core-util-is": {
+ "node_modules/core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
},
- "date-now": {
+ "node_modules/date-now": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
"integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
"dev": true
},
- "debug": {
+ "node_modules/debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)",
"dev": true,
- "requires": {
+ "dependencies": {
"ms": "^2.1.1"
}
},
- "decamelize": {
+ "node_modules/decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
},
- "define-properties": {
+ "node_modules/define-properties": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
"integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"object-keys": "^1.0.12"
+ },
+ "engines": {
+ "node": ">= 0.4"
}
},
- "diff": {
+ "node_modules/diff": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=0.3.1"
+ }
},
- "dom-serializer": {
+ "node_modules/dom-serializer": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
"integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
"dev": true,
- "requires": {
+ "dependencies": {
"domelementtype": "^2.0.1",
"entities": "^2.0.0"
- },
- "dependencies": {
- "domelementtype": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz",
- "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==",
- "dev": true
- },
- "entities": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz",
- "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==",
- "dev": true
- }
}
},
- "domelementtype": {
+ "node_modules/dom-serializer/node_modules/domelementtype": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz",
+ "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==",
+ "dev": true
+ },
+ "node_modules/dom-serializer/node_modules/entities": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz",
+ "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==",
+ "dev": true
+ },
+ "node_modules/domelementtype": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
"integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==",
"dev": true
},
- "domhandler": {
+ "node_modules/domhandler": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz",
"integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=",
"dev": true,
- "requires": {
+ "dependencies": {
"domelementtype": "1"
}
},
- "domutils": {
+ "node_modules/domutils": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
"integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=",
"dev": true,
- "requires": {
+ "dependencies": {
"dom-serializer": "0",
"domelementtype": "1"
}
},
- "emoji-regex": {
+ "node_modules/emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
"dev": true
},
- "entities": {
+ "node_modules/entities": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
"integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=",
"dev": true
},
- "es-abstract": {
+ "node_modules/es-abstract": {
"version": "1.17.6",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz",
"integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==",
"dev": true,
- "requires": {
+ "dependencies": {
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"has": "^1.0.3",
@@ -283,126 +328,185 @@
"object.assign": "^4.1.0",
"string.prototype.trimend": "^1.0.1",
"string.prototype.trimstart": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "es-to-primitive": {
+ "node_modules/es-to-primitive": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
"integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
"dev": true,
- "requires": {
+ "dependencies": {
"is-callable": "^1.1.4",
"is-date-object": "^1.0.1",
"is-symbol": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "escape-string-regexp": {
+ "node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.0"
+ }
},
- "esprima": {
+ "node_modules/esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
- "dev": true
+ "dev": true,
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
},
- "exit": {
+ "node_modules/exit": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
"integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8.0"
+ }
},
- "find-up": {
+ "node_modules/find-up": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"dev": true,
- "requires": {
+ "dependencies": {
"locate-path": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
}
},
- "flat": {
+ "node_modules/flat": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz",
"integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==",
+ "deprecated": "Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.",
"dev": true,
- "requires": {
+ "dependencies": {
"is-buffer": "~2.0.3"
+ },
+ "bin": {
+ "flat": "cli.js"
}
},
- "fs.realpath": {
+ "node_modules/fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
- "function-bind": {
+ "node_modules/function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
},
- "get-caller-file": {
+ "node_modules/get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ }
},
- "glob": {
+ "node_modules/glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"dev": true,
- "requires": {
+ "dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "growl": {
+ "node_modules/growl": {
"version": "1.10.5",
"resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
"integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=4.x"
+ }
},
- "has": {
+ "node_modules/has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dev": true,
- "requires": {
+ "dependencies": {
"function-bind": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
}
},
- "has-flag": {
+ "node_modules/has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
},
- "has-symbols": {
+ "node_modules/has-symbols": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
"integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
},
- "he": {
+ "node_modules/he": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
- "dev": true
+ "dev": true,
+ "bin": {
+ "he": "bin/he"
+ }
},
- "htmlparser2": {
+ "node_modules/htmlparser2": {
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz",
"integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=",
"dev": true,
- "requires": {
+ "dependencies": {
"domelementtype": "1",
"domhandler": "2.3",
"domutils": "1.5",
@@ -410,98 +514,131 @@
"readable-stream": "1.1"
}
},
- "inflight": {
+ "node_modules/inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dev": true,
- "requires": {
+ "dependencies": {
"once": "^1.3.0",
"wrappy": "1"
}
},
- "inherits": {
+ "node_modules/inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
},
- "is-buffer": {
+ "node_modules/is-buffer": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
"integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
},
- "is-callable": {
+ "node_modules/is-callable": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz",
"integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
},
- "is-date-object": {
+ "node_modules/is-date-object": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
"integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
},
- "is-fullwidth-code-point": {
+ "node_modules/is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
},
- "is-regex": {
+ "node_modules/is-regex": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz",
"integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==",
"dev": true,
- "requires": {
+ "dependencies": {
"has-symbols": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "is-symbol": {
+ "node_modules/is-symbol": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
"integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"has-symbols": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "isarray": {
+ "node_modules/isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
"dev": true
},
- "isexe": {
+ "node_modules/isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
"dev": true
},
- "jquery": {
+ "node_modules/jquery": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz",
"integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==",
"dev": true
},
- "js-yaml": {
+ "node_modules/js-yaml": {
"version": "3.13.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
"dev": true,
- "requires": {
+ "dependencies": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
}
},
- "jshint": {
+ "node_modules/jshint": {
"version": "2.11.1",
"resolved": "https://registry.npmjs.org/jshint/-/jshint-2.11.1.tgz",
"integrity": "sha512-WXWePB8ssAH3DlD05IoqolsY6arhbll/1+i2JkRPpihQAuiNaR/gSt8VKIcxpV5m6XChP0hCwESQUqpuQMA8Tg==",
"dev": true,
- "requires": {
+ "dependencies": {
"cli": "~1.0.0",
"console-browserify": "1.1.x",
"exit": "0.1.x",
@@ -510,63 +647,79 @@
"minimatch": "~3.0.2",
"shelljs": "0.3.x",
"strip-json-comments": "1.0.x"
+ },
+ "bin": {
+ "jshint": "bin/jshint"
}
},
- "locate-path": {
+ "node_modules/locate-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"dev": true,
- "requires": {
+ "dependencies": {
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
}
},
- "lodash": {
+ "node_modules/lodash": {
"version": "4.17.19",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
"dev": true
},
- "log-symbols": {
+ "node_modules/log-symbols": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
"integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
"dev": true,
- "requires": {
+ "dependencies": {
"chalk": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=4"
}
},
- "minimatch": {
+ "node_modules/minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
- "requires": {
+ "dependencies": {
"brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
}
},
- "minimist": {
+ "node_modules/minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true
},
- "mkdirp": {
+ "node_modules/mkdirp": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz",
"integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==",
+ "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)",
"dev": true,
- "requires": {
+ "dependencies": {
"minimist": "^1.2.5"
+ },
+ "bin": {
+ "mkdirp": "bin/cmd.js"
}
},
- "mocha": {
+ "node_modules/mocha": {
"version": "6.2.3",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.3.tgz",
"integrity": "sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg==",
"dev": true,
- "requires": {
+ "dependencies": {
"ansi-colors": "3.2.3",
"browser-stdout": "1.3.1",
"debug": "3.2.6",
@@ -591,172 +744,228 @@
"yargs-parser": "13.1.2",
"yargs-unparser": "1.6.0"
},
+ "bin": {
+ "_mocha": "bin/_mocha",
+ "mocha": "bin/mocha"
+ },
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+ },
+ "node_modules/mocha/node_modules/glob": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
+ "dev": true,
"dependencies": {
- "glob": {
- "version": "7.1.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
- "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
- "dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- },
- "strip-json-comments": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
- "dev": true
- }
- }
- },
- "ms": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/mocha/node_modules/strip-json-comments": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
"dev": true
},
- "node-environment-flags": {
+ "node_modules/node-environment-flags": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz",
"integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"object.getownpropertydescriptors": "^2.0.3",
"semver": "^5.7.0"
}
},
- "object-inspect": {
+ "node_modules/object-inspect": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz",
"integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==",
- "dev": true
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
},
- "object-keys": {
+ "node_modules/object-keys": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ }
},
- "object.assign": {
+ "node_modules/object.assign": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
"integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
"dev": true,
- "requires": {
+ "dependencies": {
"define-properties": "^1.1.2",
"function-bind": "^1.1.1",
"has-symbols": "^1.0.0",
"object-keys": "^1.0.11"
+ },
+ "engines": {
+ "node": ">= 0.4"
}
},
- "object.getownpropertydescriptors": {
+ "node_modules/object.getownpropertydescriptors": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz",
"integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==",
"dev": true,
- "requires": {
+ "dependencies": {
"define-properties": "^1.1.3",
"es-abstract": "^1.17.0-next.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "once": {
+ "node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
- "requires": {
+ "dependencies": {
"wrappy": "1"
}
},
- "p-limit": {
+ "node_modules/p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dev": true,
- "requires": {
+ "dependencies": {
"p-try": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "p-locate": {
+ "node_modules/p-locate": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"p-limit": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
}
},
- "p-try": {
+ "node_modules/p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
},
- "path-exists": {
+ "node_modules/path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
},
- "path-is-absolute": {
+ "node_modules/path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
},
- "readable-stream": {
+ "node_modules/readable-stream": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"dev": true,
- "requires": {
+ "dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
"isarray": "0.0.1",
"string_decoder": "~0.10.x"
}
},
- "require-directory": {
+ "node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
},
- "require-main-filename": {
+ "node_modules/require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
"dev": true
},
- "semver": {
+ "node_modules/semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver"
+ }
},
- "set-blocking": {
+ "node_modules/set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
"dev": true
},
- "shelljs": {
+ "node_modules/shelljs": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz",
"integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=",
- "dev": true
+ "dev": true,
+ "bin": {
+ "shjs": "bin/shjs"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
},
- "should": {
+ "node_modules/should": {
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz",
"integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"should-equal": "^2.0.0",
"should-format": "^3.0.3",
"should-type": "^1.4.0",
@@ -764,194 +973,228 @@
"should-util": "^1.0.0"
}
},
- "should-equal": {
+ "node_modules/should-equal": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz",
"integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==",
"dev": true,
- "requires": {
+ "dependencies": {
"should-type": "^1.4.0"
}
},
- "should-format": {
+ "node_modules/should-format": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz",
"integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=",
"dev": true,
- "requires": {
+ "dependencies": {
"should-type": "^1.3.0",
"should-type-adaptors": "^1.0.1"
}
},
- "should-type": {
+ "node_modules/should-type": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz",
"integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=",
"dev": true
},
- "should-type-adaptors": {
+ "node_modules/should-type-adaptors": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz",
"integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==",
"dev": true,
- "requires": {
+ "dependencies": {
"should-type": "^1.3.0",
"should-util": "^1.0.0"
}
},
- "should-util": {
+ "node_modules/should-util": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.0.tgz",
"integrity": "sha1-yYzaN0qmsZDfi6h8mInCtNtiAGM=",
"dev": true
},
- "sprintf-js": {
+ "node_modules/sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true
},
- "string-width": {
+ "node_modules/string_decoder": {
+ "version": "0.10.31",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
+ "dev": true
+ },
+ "node_modules/string-width": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"dev": true,
- "requires": {
+ "dependencies": {
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=4"
}
},
- "string.prototype.trimend": {
+ "node_modules/string.prototype.trimend": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz",
"integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==",
"dev": true,
- "requires": {
+ "dependencies": {
"define-properties": "^1.1.3",
"es-abstract": "^1.17.5"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "string.prototype.trimstart": {
+ "node_modules/string.prototype.trimstart": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz",
"integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==",
"dev": true,
- "requires": {
+ "dependencies": {
"define-properties": "^1.1.3",
"es-abstract": "^1.17.5"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "string_decoder": {
- "version": "0.10.31",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
- "dev": true
- },
- "strip-ansi": {
+ "node_modules/strip-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"dev": true,
- "requires": {
+ "dependencies": {
"ansi-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
}
},
- "strip-json-comments": {
+ "node_modules/strip-json-comments": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz",
"integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=",
- "dev": true
+ "dev": true,
+ "bin": {
+ "strip-json-comments": "cli.js"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
},
- "supports-color": {
+ "node_modules/supports-color": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz",
"integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==",
"dev": true,
- "requires": {
+ "dependencies": {
"has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
}
},
- "which": {
+ "node_modules/which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"isexe": "^2.0.0"
+ },
+ "bin": {
+ "which": "bin/which"
}
},
- "which-module": {
+ "node_modules/which-module": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
"dev": true
},
- "wide-align": {
+ "node_modules/wide-align": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
"dev": true,
- "requires": {
+ "dependencies": {
"string-width": "^1.0.2 || 2"
}
},
- "wrap-ansi": {
+ "node_modules/wrap-ansi": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
"integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
"dev": true,
- "requires": {
+ "dependencies": {
"ansi-styles": "^3.2.0",
"string-width": "^3.0.0",
"strip-ansi": "^5.0.0"
},
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "dev": true,
"dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
- "dev": true
- },
- "string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
- "dev": true,
- "requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
- }
- },
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
- "dev": true,
- "requires": {
- "ansi-regex": "^4.1.0"
- }
- }
- }
- },
- "wrappy": {
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
},
- "y18n": {
+ "node_modules/y18n": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
"dev": true
},
- "yargs": {
+ "node_modules/yargs": {
"version": "13.3.2",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
"integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
"dev": true,
- "requires": {
+ "dependencies": {
"cliui": "^5.0.0",
"find-up": "^3.0.0",
"get-caller-file": "^2.0.1",
@@ -962,55 +1205,65 @@
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^13.1.2"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
- "dev": true
- },
- "string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
- "dev": true,
- "requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
- }
- },
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
- "dev": true,
- "requires": {
- "ansi-regex": "^4.1.0"
- }
- }
- }
- },
- "yargs-parser": {
+ }
+ },
+ "node_modules/yargs-parser": {
"version": "13.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
"integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
"dev": true,
- "requires": {
+ "dependencies": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
}
},
- "yargs-unparser": {
+ "node_modules/yargs-unparser": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz",
"integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==",
"dev": true,
- "requires": {
+ "dependencies": {
"flat": "^4.1.0",
"lodash": "^4.17.15",
"yargs": "^13.3.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/yargs/node_modules/ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/yargs/node_modules/string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "dev": true,
+ "dependencies": {
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/yargs/node_modules/strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=6"
}
}
}
diff --git a/test/domino.js b/test/domino.js
index 83c8d75..49ddd6a 100644
--- a/test/domino.js
+++ b/test/domino.js
@@ -2,12 +2,21 @@
var domino = require('../lib');
var fs = require('fs');
var html = fs.readFileSync(__dirname + '/fixture/doc.html', 'utf8');
+var Window = require('../lib/Window');
exports = exports.domino = {};
+function createWindow(html, address) {
+ var document = domino.createDocument(html);
+ if (address) {
+ document.address = 'http://example.com/';
+ }
+ return new Window(document);
+}
+
exports.matches = function() {
// see https://developer.mozilla.org/en-US/docs/Web/API/Element.matches
- var d = domino.createWindow(html).document;
+ var d = createWindow(html).document;
var h1 = d.getElementById('lorem');
h1.matches('h1').should.equal(true);
h1.matches('body > h1').should.equal(true); // not rooted
@@ -26,7 +35,7 @@ exports.closest = function() {
' \n' +
' \n' +
'';
- var document = domino.createWindow(html).document;
+ var document = createWindow(html).document;
var el = document.getElementById('div-03');
var r1 = el.closest('#div-02');
r1.id.should.equal('div-02');
@@ -52,7 +61,7 @@ exports.closest = function() {
};
exports.querySelectorAll = function() {
- var window = domino.createWindow(html);
+ var window = createWindow(html);
var d = window.document;
var nodeList = d.querySelectorAll('p');
nodeList.should.have.property('item');
@@ -114,7 +123,7 @@ exports.escapeQSA = function() {
};
exports.gh20 = function() {
- var window = domino.createWindow('');
+ var window = createWindow('');
var frag = window.document.createDocumentFragment();
frag.querySelectorAll('p').should.have.length(0);
@@ -132,7 +141,7 @@ exports.gh22 = function() {
d.body.querySelectorAll('h1').should.have.length(1);
d.body.querySelectorAll('p').should.have.length(1);
- var w=domino.createWindow("");
+ var w=createWindow("");
d=w.document;
d.querySelectorAll('div').should.have.length(1);
d.body.querySelectorAll('div').should.have.length(1);
@@ -251,16 +260,16 @@ exports.attributes2 = function() {
(div.attributes.onclick === undefined).should.be.true();
};
-exports.jquery1_9 = function() {
- var window = domino.createWindow(html);
- var f = __dirname + '/fixture/jquery-1.9.1.js';
- window._run(fs.readFileSync(f, 'utf8'), f);
- window.$.should.be.ok();
- window.$('.foo').should.have.length(3);
-};
+// exports.jquery1_9 = function() {
+// var window = createWindow(html);
+// var f = __dirname + '/fixture/jquery-1.9.1.js';
+// window._run(fs.readFileSync(f, 'utf8'), f);
+// window.$.should.be.ok();
+// window.$('.foo').should.have.length(3);
+// };
exports.jquery2_2 = function() {
- var window = domino.createWindow(html);
+ var window = createWindow(html);
window.$ = require(__dirname + '/fixture/jquery-2.2.0.js')(window);
window.$.should.be.ok();
window.$('.foo').should.have.length(3);
@@ -271,7 +280,7 @@ exports.jquery2_2 = function() {
};
exports.jquery3 = function() {
- var window = domino.createWindow(html);
+ var window = createWindow(html);
window.$ = require(__dirname + '/../node_modules/jquery/dist/jquery.js')(window);
window.$.should.be.ok();
window.$('.foo').should.have.length(3);
@@ -282,7 +291,7 @@ exports.jquery3 = function() {
};
exports.treeWalker = function() {
- var window = domino.createWindow(html);
+ var window = createWindow(html);
var d = window.document;
var root = d.getElementById('tw');
var tw = d.createTreeWalker(root, window.NodeFilter.SHOW_TEXT, function(n) {
@@ -308,7 +317,7 @@ exports.treeWalker = function() {
};
exports.nodeIterator = function() {
- var window = domino.createWindow(html);
+ var window = createWindow(html);
var d = window.document;
var root = d.getElementById('tw');
var ni = d.createNodeIterator(root, window.NodeFilter.SHOW_TEXT, function(n) {
@@ -657,7 +666,7 @@ exports.replaceChild = function() {
exports.contains = function() {
// see https://developer.mozilla.org/en-US/docs/Web/API/Node/contains
- var document = domino.createWindow(html).document;
+ var document = createWindow(html).document;
var h1 = document.getElementById('lorem');
h1.contains(null).should.equal(false);
h1.contains(h1).should.equal(true);
@@ -707,7 +716,7 @@ exports.gh71 = function() {
};
exports.gh72 = function() {
- var window = domino.createWindow('Hello, world! ');
+ var window = createWindow('Hello, world! ');
window.setTimeout.should.have.type('function');
window.clearTimeout.should.have.type('function');
window.setInterval.should.have.type('function');
@@ -715,7 +724,7 @@ exports.gh72 = function() {
};
exports.navigatorID = function() {
- var window = domino.createWindow('Hello, world! ');
+ var window = createWindow('Hello, world! ');
window.navigator.appCodeName.should.equal("Mozilla");
window.navigator.taintEnabled().should.equal(false);
};
@@ -979,7 +988,7 @@ exports.gh95 = function() {
};
exports.propertyWritability = function () { // gh #89
- var window = domino.createWindow('');
+ var window = createWindow('');
var document = domino.createDocument();
var assertWritable = function(object, property) {
@@ -1039,7 +1048,7 @@ exports.gh98 = function() {
exports.gh99 = function() {
// test '#foo' optimization in querySelectorAll
- var window = domino.createWindow(
+ var window = createWindow(
''
);
var doc = window.document;
@@ -1063,7 +1072,7 @@ exports.gh99 = function() {
exports.gh112 = function() {
// attributes named 'xmlns' are fine. (gh #112)
- var window = domino.createWindow(
+ var window = createWindow(
' '
);
var document = window.document;
@@ -1239,7 +1248,7 @@ exports.gh128 = function() {
};
exports.gh129 = function() {
- var window = domino.createWindow();
+ var window = createWindow();
var document = window.document;
var div = document.body.appendChild(document.createElement('div'));
div.innerHTML = '
';
diff --git a/test/html5lib-tests.json b/test/html5lib-tests.json
index 2b1c3e8..d462147 100644
--- a/test/html5lib-tests.json
+++ b/test/html5lib-tests.json
@@ -36879,7 +36879,7 @@
}
],
"html": " ",
- "noQuirksBodyHtml": " "
+ "noQuirksBodyHtml": " "
}
},
{
@@ -36936,7 +36936,7 @@
}
],
"html": " ",
- "noQuirksBodyHtml": " "
+ "noQuirksBodyHtml": " "
}
},
{
@@ -36993,7 +36993,7 @@
}
],
"html": " ",
- "noQuirksBodyHtml": " "
+ "noQuirksBodyHtml": " "
}
},
{
diff --git a/test/w3c/harness/index.js b/test/w3c/harness/index.js
index 2eef3e4..5e69274 100644
--- a/test/w3c/harness/index.js
+++ b/test/w3c/harness/index.js
@@ -5,6 +5,7 @@ var util = require('util');
var Path = require('path');
var domino = require('../../../lib');
var impl = domino.createDOMImplementation();
+var Window = require('../../../lib/Window');
var globals = {
assertEquals: function(message, expected, actual) {
@@ -69,7 +70,10 @@ module.exports = function(path) {
var doc = Path.resolve(__dirname, '..', path, 'files', href) + '.html';
var html = fs.readFileSync(doc, 'utf8');
var url = 'http://example.com/'+Path.join(path,'files',href)+'.html';
- var win = domino.createWindow(html, url);
+
+ var document = domino.createDocument(html);
+ document.address = url;
+ var win = new Window(document);
return win.document;
}
};
diff --git a/test/web-platform-blacklist.json b/test/web-platform-blocklist.json
similarity index 100%
rename from test/web-platform-blacklist.json
rename to test/web-platform-blocklist.json
diff --git a/test/web-platform-tests.js b/test/web-platform-tests.js
index 940c80b..7aff7b4 100644
--- a/test/web-platform-tests.js
+++ b/test/web-platform-tests.js
@@ -4,19 +4,19 @@ var Path = require('path');
var domino = require('../lib');
var Window = require('../lib/Window');
-var BLACKLIST_PATH = Path.resolve(__dirname, 'web-platform-blacklist.json');
-// Set to true and delete the existing blacklist file to regenerate the
-// blacklist from currently-failing tests.
-var WRITE_BLACKLIST = false;
+var BLOCKLIST_PATH = Path.resolve(__dirname, 'web-platform-blocklist.json');
+// Set to true and delete the existing blocklist file to regenerate the
+// blocklist from currently-failing tests.
+var WRITE_BLOCKLIST = false;
// These are the tests we currently fail.
// Some of these failures are bugs we ought to fix.
-var blacklist = {};
+var blocklist = {};
try {
- blacklist = require(BLACKLIST_PATH);
+ blocklist = require(BLOCKLIST_PATH);
} catch(e) {
- // We expect that you deleted the old blacklist before using WRITE_BLACKLIST
- if (!WRITE_BLACKLIST) { throw e; }
+ // We expect that you deleted the old blocklist before using WRITE_BLOCKLIST
+ if (!WRITE_BLOCKLIST) { throw e; }
}
var escapeRegExp = function(s) {
@@ -31,11 +31,11 @@ var escapeRegExp = function(s) {
});
};
-var onBlacklist = function(shortFile) {
- if (WRITE_BLACKLIST) { return null; }
- if (!Array.isArray(blacklist[shortFile])) { return null; }
+var onblocklist = function(shortFile) {
+ if (WRITE_BLOCKLIST) { return null; }
+ if (!Array.isArray(blocklist[shortFile])) { return null; }
// convert strings to huge regexp
- return new RegExp('^(' + blacklist[shortFile].map(escapeRegExp).join('|') + ')$');
+ return new RegExp('^(' + blocklist[shortFile].map(escapeRegExp).join('|') + ')$');
};
// Test suite requires Array.includes(); polyfill from
@@ -81,7 +81,7 @@ function read(file) {
return fs.readFileSync(Path.resolve(__dirname, '..', file), 'utf8');
}
-var testharness = read(__dirname + '/web-platform-tests/resources/testharness.js');
+var testharness = require(__dirname + '/web-platform-tests/resources/testharness.js');
function list(base, dir, fn) {
var result = {};
@@ -135,7 +135,11 @@ var harness = function() {
return; // skip
}
var html = read(file);
- var window = domino.createWindow(html, 'http://example.com/');
+
+ var document = domino.createDocument(html);
+ document.address = 'http://example.com/';
+ var window = new Window(document);
+
Array.from(window.document.getElementsByTagName('iframe')).forEach(function(iframe) {
if (iframe.src === 'http://example.com/common/dummy.xml') {
var dummyXmlDoc = domino.createDOMImplementation().createDocument(
@@ -171,16 +175,17 @@ var harness = function() {
iframe._contentWindow = new Window(dummyXhtmlDoc);
}
});
- window._run(testharness);
- window._run('window.setup({explicit_timeout:true})');
+ testharness(window);
+ window.setup({explicit_timeout:true});
+
if (forceSyncTestFiles.test(file)) {
- window._run(
- 'async_test = function(){return {'+
- 'step: function() {},' +
- 'step_func_done: function() {},'+
- 'done: function() {},'+
- '}};'
- );
+ window.async_test = function(){
+ return {
+ step: function() {},
+ step_func_done: function() {},
+ done: function() {},
+ }
+ };
}
var scripts = window.document.getElementsByTagName('script');
scripts = Array.from(scripts);
@@ -259,7 +264,7 @@ var harness = function() {
'Array.from(document.getElementsByTagName("iframe")).forEach(' +
'function(f){f.dispatchEvent(new Event("load"));});';
- var expectedFailures = onBlacklist(shortFile);
+ var expectedFailures = onblocklist(shortFile);
return function(done) {
var haveTests = false, isComplete = false, sawError = [];
@@ -270,7 +275,7 @@ var harness = function() {
return;
}
else { calledOnce = true; }
- if (!WRITE_BLACKLIST) {
+ if (!WRITE_BLOCKLIST) {
var str = results.map(function(item) {
var s = item.name;
if (item.message) s += ': ' + item.message;
@@ -290,7 +295,7 @@ var harness = function() {
} else {
var bl = {};
try {
- bl = JSON.parse(fs.readFileSync(BLACKLIST_PATH, 'utf-8'));
+ bl = JSON.parse(fs.readFileSync(blocklist_PATH, 'utf-8'));
} catch (e) { /* ignore */ }
bl[shortFile] = results.map(function(item) { return item.name; });
sawError.forEach(function(err) {
@@ -298,7 +303,7 @@ var harness = function() {
});
if (!bl[shortFile].length) { bl[shortFile] = undefined; }
fs.writeFileSync(
- BLACKLIST_PATH, JSON.stringify(bl, null, 2), 'utf-8'
+ blocklist_PATH, JSON.stringify(bl, null, 2), 'utf-8'
);
done();
}
@@ -323,16 +328,17 @@ var harness = function() {
});
withResults(report);
});
- try {
- window._run(concatenatedScripts);
- } catch (e) {
- sawError.push(e);
- }
- try {
- window._run(closeDocument);
- } catch (e) {
- sawError.push(e);
- }
+ // TODO(jessicajaniuk): window._run was removed to enable ESM support
+ // try {
+ // window._run(concatenatedScripts);
+ // } catch (e) {
+ // sawError.push(e);
+ // }
+ // try {
+ // window._run(closeDocument);
+ // } catch (e) {
+ // sawError.push(e);
+ // }
if (!sawTestHarness) { withResults([]); }
else if (sawError.length && !haveTests) { withResults([]); }
};
@@ -341,7 +347,7 @@ var harness = function() {
return harnessResult;
};
-module.exports = harness(__dirname + '/web-platform-tests/html/dom',
- __dirname + '/web-platform-tests/dom/nodes',
- __dirname + '/web-platform-tests/dom/traversal',
- __dirname + '/web-platform-tests/domparsing');
+// module.exports = harness(__dirname + '/web-platform-tests/html/dom',
+// __dirname + '/web-platform-tests/dom/nodes',
+// __dirname + '/web-platform-tests/dom/traversal',
+// __dirname + '/web-platform-tests/domparsing');