aboutsummaryrefslogtreecommitdiff
path: root/test/html-paths.tests.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-08-28 19:55:24 +0100
committerMichael Williamson <mike@zwobble.org>2016-08-28 19:55:38 +0100
commitb1ae23f544c479d2b71347bbf67df7baac40d78f (patch)
tree383e694dae42ba544f690c3b0ab388a7931c0793 /test/html-paths.tests.js
parent7dba15069f9a606b9e248d7e4cd024ddaa6ac3e3 (diff)
parentc42714e5f4b643de27b106a084601e39b7e5d04c (diff)
Merge branch 'master' into image-errors
Conflicts: test/mammoth.tests.js
Diffstat (limited to 'test/html-paths.tests.js')
-rw-r--r--test/html-paths.tests.js28
1 files changed, 13 insertions, 15 deletions
diff --git a/test/html-paths.tests.js b/test/html-paths.tests.js
index 76a77ef..8d75b7c 100644
--- a/test/html-paths.tests.js
+++ b/test/html-paths.tests.js
@@ -1,22 +1,20 @@
var assert = require("assert");
-var test = require("./testing").test;
+var test = require("./test")(module);
var htmlPaths = require("../lib/html-paths");
-describe("html-paths", function() {
- test("element can match multiple tag names", function() {
- var pathPart = htmlPaths.element(["ul", "ol"]);
- assert.ok(pathPart.matchesElement({tagName: "ul"}));
- assert.ok(pathPart.matchesElement({tagName: "ol"}));
- assert.ok(!pathPart.matchesElement({tagName: "p"}));
- });
-
- test("element matches if attributes are the same", function() {
- var pathPart = htmlPaths.element(["p"], {"class": "tip"});
- assert.ok(!pathPart.matchesElement({tagName: "p"}));
- assert.ok(!pathPart.matchesElement({tagName: "p", attributes: {"class": "tip help"}}));
- assert.ok(pathPart.matchesElement({tagName: "p", attributes: {"class": "tip"}}));
- });
+test("element can match multiple tag names", function() {
+ var pathPart = htmlPaths.element(["ul", "ol"]);
+ assert.ok(pathPart.matchesElement({tagName: "ul"}));
+ assert.ok(pathPart.matchesElement({tagName: "ol"}));
+ assert.ok(!pathPart.matchesElement({tagName: "p"}));
+});
+
+test("element matches if attributes are the same", function() {
+ var pathPart = htmlPaths.element(["p"], {"class": "tip"});
+ assert.ok(!pathPart.matchesElement({tagName: "p"}));
+ assert.ok(!pathPart.matchesElement({tagName: "p", attributes: {"class": "tip help"}}));
+ assert.ok(pathPart.matchesElement({tagName: "p", attributes: {"class": "tip"}}));
});