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.

17 lines
422 B

4 years ago
  1. var makeDom = require("../utils").makeDom;
  2. var traversal = require("../..");
  3. var assert = require("assert");
  4. describe("traversal", function() {
  5. describe("hasAttrib", function() {
  6. var hasAttrib = traversal.hasAttrib;
  7. it("doesn't throw on text nodes", function() {
  8. var dom = makeDom("textnode");
  9. assert.doesNotThrow(function() {
  10. hasAttrib(dom[0], "some-attrib");
  11. });
  12. });
  13. });
  14. });