MCPcopy Create free account
hub / github.com/easydiffusion/easydiffusion / HtmlReporter

Function HtmlReporter

ui/plugins/ui/jasmine/jasmine-html.js:82–733  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

80 }
81
82 function HtmlReporter(options) {
83 function config() {
84 return (options.env && options.env.configuration()) || {}
85 }
86
87 const getContainer = options.getContainer
88 const createElement = options.createElement
89 const createTextNode = options.createTextNode
90 const navigateWithNewParam = options.navigateWithNewParam || function() {}
91 const addToExistingQueryString = options.addToExistingQueryString || defaultQueryString
92 const filterSpecs = options.filterSpecs
93 let htmlReporterMain
94 let symbols
95 const deprecationWarnings = []
96 const failures = []
97
98 this.initialize = function() {
99 clearPrior()
100 htmlReporterMain = createDom(
101 "div",
102 { className: "jasmine_html-reporter" },
103 createDom(
104 "div",
105 { className: "jasmine-banner" },
106 createDom("a", {
107 className: "jasmine-title",
108 href: "http://jasmine.github.io/",
109 target: "_blank",
110 }),
111 createDom("span", { className: "jasmine-version" }, j$.version)
112 ),
113 createDom("ul", { className: "jasmine-symbol-summary" }),
114 createDom("div", { className: "jasmine-alert" }),
115 createDom("div", { className: "jasmine-results" }, createDom("div", { className: "jasmine-failures" }))
116 )
117 getContainer().appendChild(htmlReporterMain)
118 }
119
120 let totalSpecsDefined
121 this.jasmineStarted = function(options) {
122 totalSpecsDefined = options.totalSpecsDefined || 0
123 }
124
125 const summary = createDom("div", { className: "jasmine-summary" })
126
127 const stateBuilder = new ResultsStateBuilder()
128
129 this.suiteStarted = function(result) {
130 stateBuilder.suiteStarted(result)
131 }
132
133 this.suiteDone = function(result) {
134 stateBuilder.suiteDone(result)
135
136 if (result.status === "failed") {
137 failures.push(failureDom(result))
138 }
139 addDeprecationWarnings(result, "suite")

Callers

nothing calls this directly

Calls 15

clearPriorFunction · 0.85
createDomFunction · 0.85
failureDomFunction · 0.85
addDeprecationWarningsFunction · 0.85
noExpectationsFunction · 0.85
findFunction · 0.85
configFunction · 0.85
optionsMenuFunction · 0.85
pluralizeFunction · 0.85
seedHrefFunction · 0.85
globalFailureMessageFunction · 0.85
createExpanderFunction · 0.85

Tested by

no test coverage detected