biofriction-wp-theme/node_modules/domutils/test/tests/traversal.js

18 lines
422 B
JavaScript
Raw Permalink Normal View History

2021-10-26 14:18:09 +02:00
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");
});
});
});
});