summaryrefslogtreecommitdiff
path: root/tests/html-paths.tests.js
blob: 7e3ed86b571866462024cbc39872f65d0fb82803 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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"}));
    });
});