diff --git a/lib/jasmine-core/jasmine-html.js b/lib/jasmine-core/jasmine-html.js
index fb819675..22eba1cb 100644
--- a/lib/jasmine-core/jasmine-html.js
+++ b/lib/jasmine-core/jasmine-html.js
@@ -126,6 +126,7 @@ jasmineRequire.HtmlReporter = function(j$) {
#urlBuilder;
#filterSpecs;
#stateBuilder;
+ #config;
#htmlReporterMain;
// Sub-views
@@ -157,13 +158,12 @@ jasmineRequire.HtmlReporter = function(j$) {
*/
initialize() {
this.#clearPrior();
+ this.#config = this.#env ? this.#env.configuration() : {};
+
this.#stateBuilder = new ResultsStateBuilder();
this.#alerts = new AlertsView(this.#domContext, this.#urlBuilder);
- this.#symbols = new SymbolsView(
- this.#domContext,
- this.#config.bind(this)
- );
+ this.#symbols = new SymbolsView(this.#domContext);
this.#banner = new Banner(this.#domContext, this.#navigateWithNewParam);
this.#failures = new FailuresView(this.#domContext, this.#urlBuilder);
this.#htmlReporterMain = this.#domContext.create(
@@ -197,7 +197,7 @@ jasmineRequire.HtmlReporter = function(j$) {
specDone(result) {
this.#stateBuilder.specDone(result);
- this.#symbols.append(result, this.#config());
+ this.#symbols.append(result, this.#config);
if (noExpectations(result)) {
const noSpecMsg = "Spec '" + result.fullName + "' has no expectations.";
@@ -218,7 +218,7 @@ jasmineRequire.HtmlReporter = function(j$) {
jasmineDone(doneResult) {
this.#stateBuilder.jasmineDone(doneResult);
this.#alerts.addDuration(doneResult.totalTime);
- this.#banner.showOptionsMenu(this.#config());
+ this.#banner.showOptionsMenu(this.#config);
if (
this.#stateBuilder.specsExecuted < this.#stateBuilder.totalSpecsDefined
@@ -261,10 +261,6 @@ jasmineRequire.HtmlReporter = function(j$) {
}
}
- #config() {
- return (this.#env && this.#env.configuration()) || {};
- }
-
#find(selector) {
return this.#getContainer().querySelector(
'.jasmine_html-reporter ' + selector
diff --git a/src/html/HtmlReporter.js b/src/html/HtmlReporter.js
index 2a5c771f..5c0fc14d 100644
--- a/src/html/HtmlReporter.js
+++ b/src/html/HtmlReporter.js
@@ -91,6 +91,7 @@ jasmineRequire.HtmlReporter = function(j$) {
#urlBuilder;
#filterSpecs;
#stateBuilder;
+ #config;
#htmlReporterMain;
// Sub-views
@@ -122,13 +123,12 @@ jasmineRequire.HtmlReporter = function(j$) {
*/
initialize() {
this.#clearPrior();
+ this.#config = this.#env ? this.#env.configuration() : {};
+
this.#stateBuilder = new ResultsStateBuilder();
this.#alerts = new AlertsView(this.#domContext, this.#urlBuilder);
- this.#symbols = new SymbolsView(
- this.#domContext,
- this.#config.bind(this)
- );
+ this.#symbols = new SymbolsView(this.#domContext);
this.#banner = new Banner(this.#domContext, this.#navigateWithNewParam);
this.#failures = new FailuresView(this.#domContext, this.#urlBuilder);
this.#htmlReporterMain = this.#domContext.create(
@@ -162,7 +162,7 @@ jasmineRequire.HtmlReporter = function(j$) {
specDone(result) {
this.#stateBuilder.specDone(result);
- this.#symbols.append(result, this.#config());
+ this.#symbols.append(result, this.#config);
if (noExpectations(result)) {
const noSpecMsg = "Spec '" + result.fullName + "' has no expectations.";
@@ -183,7 +183,7 @@ jasmineRequire.HtmlReporter = function(j$) {
jasmineDone(doneResult) {
this.#stateBuilder.jasmineDone(doneResult);
this.#alerts.addDuration(doneResult.totalTime);
- this.#banner.showOptionsMenu(this.#config());
+ this.#banner.showOptionsMenu(this.#config);
if (
this.#stateBuilder.specsExecuted < this.#stateBuilder.totalSpecsDefined
@@ -226,10 +226,6 @@ jasmineRequire.HtmlReporter = function(j$) {
}
}
- #config() {
- return (this.#env && this.#env.configuration()) || {};
- }
-
#find(selector) {
return this.#getContainer().querySelector(
'.jasmine_html-reporter ' + selector