unquoted.js 555 B

123456789101112131415161718
  1. // unquoted attributes should be ok in non-strict mode
  2. // https://github.com/isaacs/sax-js/issues/31
  3. require(__dirname).test
  4. ( { xml :
  5. "<span class=test hello=world></span>"
  6. , expect :
  7. [ [ "attribute", { name: "CLASS", value: "test" } ]
  8. , [ "attribute", { name: "HELLO", value: "world" } ]
  9. , [ "opentag", { name: "SPAN",
  10. attributes: { CLASS: "test", HELLO: "world" },
  11. isSelfClosing: false } ]
  12. , [ "closetag", "SPAN" ]
  13. ]
  14. , strict : false
  15. , opt : {}
  16. }
  17. )