initial commit
[JIRC.git] / node_modules / jsdom / node_modules / htmlparser / pulls / node-htmlparser / tests / 14-comment_in_text_in_script.js
1 (function () {
2
3 function RunningInNode () {
4 return(
5 (typeof require) == "function"
6 &&
7 (typeof exports) == "object"
8 &&
9 (typeof module) == "object"
10 &&
11 (typeof __filename) == "string"
12 &&
13 (typeof __dirname) == "string"
14 );
15 }
16
17 if (!RunningInNode()) {
18 if (!this.Tautologistics)
19 this.Tautologistics = {};
20 if (!this.Tautologistics.NodeHtmlParser)
21 this.Tautologistics.NodeHtmlParser = {};
22 if (!this.Tautologistics.NodeHtmlParser.Tests)
23 this.Tautologistics.NodeHtmlParser.Tests = [];
24 exports = {};
25 this.Tautologistics.NodeHtmlParser.Tests.push(exports);
26 }
27
28 exports.name = "Comment within text within script";
29 exports.html = "<script>this is <!-- the comment --> the text</script>";
30 exports.expected =
31 [ { raw: 'script'
32 , data: 'script'
33 , type: 'script'
34 , name: 'script'
35 , children:
36 [ { raw: 'this is '
37 , data: 'this is '
38 , type: 'text'
39 }
40 , { raw: ' the comment '
41 , data: ' the comment '
42 , type: 'comment'
43 }
44 , { raw: ' the text'
45 , data: ' the text'
46 , type: 'text'
47 }
48
49 ]
50 }
51 ];
52
53 })();