travis-ci
4670 of 5656 branches covered (82.57%)
13 of 13 new or added lines in 2 files covered. (100.0%)
10412 of 11525 relevant lines covered (90.34%)
5850.54 hits per line
1 |
"use strict";
|
|
2 |
var Node = require("./Node"); |
19 only 2387.2 ✔ |
3 |
|
|
4 |
class DocumentType extends Node { |
|
5 |
constructor(def) { |
|
6 |
super("DocumentType"); |
147 only 2387.2 ✔ |
7 |
this.documentType = def.documentType;
|
147 only 2387.2 ✔ |
8 |
} |
|
9 |
|
|
10 |
generateHTMLCode(codegen) { |
|
11 |
var builder = codegen.builder;
|
74 only 2387.2 ✔ |
12 |
|
|
13 |
return [
|
74 only 2387.2 ✔ |
14 |
builder.htmlLiteral("<!"),
|
|
15 |
builder.html(codegen.generateCode(this.documentType)),
|
|
16 |
builder.htmlLiteral(">")
|
|
17 |
]; |
|
18 |
} |
|
19 |
|
|
20 |
generateVDOMCode() { |
|
21 |
return null; |
73 only 2387.2 ✔ |
22 |
} |
|
23 |
|
|
24 |
toJSON() { |
|
25 |
return {
|
301 only 2387.2 ✔ |
26 |
type: this.type, |
|
27 |
value: this.documentType |
|
28 |
}; |
|
29 |
} |
|
30 |
} |
|
31 |
|
|
32 |
module.exports = DocumentType; |
19 only 2387.2 ✔ |