aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-05-04 16:13:56 +0100
committerMichael Williamson <mike@zwobble.org>2013-05-04 16:13:56 +0100
commitefca7fab18dfc9d6cc384bd133ecb57016784260 (patch)
tree8daaf8ff47bfe6cd3deed07b1395d0bec82b3c82 /tests
parent8cf5cf90366a4f5f8e0efaf3bb39c0c4f8f512e0 (diff)
Allow HTML path element part to match multiple tag names
Diffstat (limited to 'tests')
-rw-r--r--tests/html-paths.tests.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/html-paths.tests.js b/tests/html-paths.tests.js
new file mode 100644
index 0000000..7e3ed86
--- /dev/null
+++ b/tests/html-paths.tests.js
@@ -0,0 +1,15 @@
+var assert = require("assert");
+
+var test = require("./testing").test;
+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"}));
+ });
+});
+