Fixed standalone distribution
This commit is contained in:
@@ -48,7 +48,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
const htmlReporter = new jasmine.HtmlReporterV2({
|
||||
env,
|
||||
urls,
|
||||
container: document.body
|
||||
getContainer() {
|
||||
return document.body;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@@ -963,7 +963,7 @@ jasmineRequire.HtmlReporterV2 = function(j$) {
|
||||
*/
|
||||
class HtmlReporterV2 {
|
||||
#env;
|
||||
#container;
|
||||
#getContainer;
|
||||
#queryString;
|
||||
#urlBuilder;
|
||||
#filterSpecs;
|
||||
@@ -981,7 +981,7 @@ jasmineRequire.HtmlReporterV2 = function(j$) {
|
||||
constructor(options) {
|
||||
this.#env = options.env;
|
||||
|
||||
this.#container = options.container;
|
||||
this.#getContainer = options.getContainer;
|
||||
this.#queryString =
|
||||
options.queryString ||
|
||||
new j$.QueryString({
|
||||
@@ -1025,7 +1025,7 @@ jasmineRequire.HtmlReporterV2 = function(j$) {
|
||||
this.#alerts.rootEl,
|
||||
this.#failures.rootEl
|
||||
);
|
||||
this.#container.appendChild(this.#htmlReporterMain);
|
||||
this.#getContainer().appendChild(this.#htmlReporterMain);
|
||||
this.#failures.show();
|
||||
}
|
||||
|
||||
@@ -1114,7 +1114,7 @@ jasmineRequire.HtmlReporterV2 = function(j$) {
|
||||
}
|
||||
|
||||
#find(selector) {
|
||||
return this.#container.querySelector(
|
||||
return this.#getContainer().querySelector(
|
||||
'.jasmine_html-reporter ' + selector
|
||||
);
|
||||
}
|
||||
@@ -1123,7 +1123,7 @@ jasmineRequire.HtmlReporterV2 = function(j$) {
|
||||
const oldReporter = this.#find('');
|
||||
|
||||
if (oldReporter) {
|
||||
this.#container.removeChild(oldReporter);
|
||||
this.#getContainer().removeChild(oldReporter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user