You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
422 B
18 lines
422 B
2 years ago
|
var makeDom = require("../utils").makeDom;
|
||
|
var traversal = require("../..");
|
||
|
var assert = require("assert");
|
||
|
|
||
|
describe("traversal", function() {
|
||
|
describe("hasAttrib", function() {
|
||
|
var hasAttrib = traversal.hasAttrib;
|
||
|
|
||
|
it("doesn't throw on text nodes", function() {
|
||
|
var dom = makeDom("textnode");
|
||
|
assert.doesNotThrow(function() {
|
||
|
hasAttrib(dom[0], "some-attrib");
|
||
|
});
|
||
|
});
|
||
|
|
||
|
});
|
||
|
});
|