From 0b56dfce42c3944cce47e284608e6806f4c839c3 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 3 Jul 2016 19:19:21 +0100 Subject: Move tests to test for easier Mocha usage --- tests/html-paths.tests.js | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 tests/html-paths.tests.js (limited to 'tests/html-paths.tests.js') diff --git a/tests/html-paths.tests.js b/tests/html-paths.tests.js deleted file mode 100644 index 76a77ef..0000000 --- a/tests/html-paths.tests.js +++ /dev/null @@ -1,22 +0,0 @@ -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"})); - }); - - 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"}})); - }); -}); - -- cgit v1.2.3