script.js 511 B

123456789101112
  1. require(__dirname).test({
  2. xml : "<html><head><script>if (1 < 0) { console.log('elo there'); }</script></head></html>",
  3. expect : [
  4. ["opentag", {"name": "HTML","attributes": {}, "isSelfClosing": false}],
  5. ["opentag", {"name": "HEAD","attributes": {}, "isSelfClosing": false}],
  6. ["opentag", {"name": "SCRIPT","attributes": {}, "isSelfClosing": false}],
  7. ["script", "if (1 < 0) { console.log('elo there'); }"],
  8. ["closetag", "SCRIPT"],
  9. ["closetag", "HEAD"],
  10. ["closetag", "HTML"]
  11. ]
  12. });