diff --git a/src/html-reporter/html.js b/src/html-reporter/html.js
index 8f1c377b1..6c66dc19d 100644
--- a/src/html-reporter/html.js
+++ b/src/html-reporter/html.js
@@ -907,10 +907,10 @@ const stats = {
expected.indexOf('[object Object]') !== -1) {
message += "
Message: | " +
'Diff suppressed as the depth of object is more than current max depth (' +
- QUnit.config.maxDepth + '). Hint: Use QUnit.dump.maxDepth to ' +
+ QUnit.dump.maxDepth + '). Hint: Use QUnit.dump.maxDepth to ' +
" run with a higher max depth or " +
- 'Rerun without max depth. |
';
+ escapeText(setUrl({ maxDepth: 0 })) + "'>" +
+ 'Rerun without max depth.';
} else {
message += "Message: | " +
'Diff suppressed as the expected and actual results have an equivalent' +
diff --git a/src/html-runner/urlparams.js b/src/html-runner/urlparams.js
index 4b2d180a1..8ee74cad1 100644
--- a/src/html-runner/urlparams.js
+++ b/src/html-runner/urlparams.js
@@ -17,6 +17,10 @@ import { window } from '../globals';
// TODO: Move to /src/core/config.js in QUnit 3,
// in accordance with /docs/api/config.index.md#order
QUnit.config.filter = urlParams.filter;
+ // NOTE: Based on readFlatPreconfigNumber from QUnit 3.
+ if (/^[0-9]+$/.test(urlParams.maxDepth)) {
+ QUnit.config.maxDepth = QUnit.dump.maxDepth = +urlParams.maxDepth;
+ }
QUnit.config.module = urlParams.module;
QUnit.config.moduleId = [].concat(urlParams.moduleId || []);
QUnit.config.testId = [].concat(urlParams.testId || []);
diff --git a/test/main/dump.js b/test/main/dump.js
index 725e8cdcc..ef9460146 100644
--- a/test/main/dump.js
+++ b/test/main/dump.js
@@ -2,9 +2,12 @@
/* eslint-disable qunit/no-conditional-assertions */
QUnit.module('dump', {
+ beforeEach: function () {
+ QUnit.dump.maxDepth = 0;
+ },
afterEach: function () {
// Restore default
- QUnit.dump.maxDepth = null;
+ QUnit.dump.maxDepth = 5;
}
});
|
---|