No Description

traversal.js 422B

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