traversal.js 422 B

123456789101112131415161718
  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. });