Back to Qunit

QUnit.config.maxDepth

docs/api/config/maxDepth.md

2.25.0877 B
Original Source

In the HTML Reporter, the depth up-to which an object will be serialized during the diff of an assertion failure.

<table> <tr> <th>type</th> <td markdown="span">`number`</td> </tr> <tr> <th>default</th> <td markdown="span">`5`</td> </tr> </table>

To disable the depth limit and allow infinite depth, use a value of 0.

This is used by QUnit.dump.parse().

Changelog

| UNRELEASED | Make QUnit.dump.maxDepth an alias for QUnit.config.maxDepth, allowing both to be read and changed at runtime. | QUnit 1.18 | Introduce QUnit.config.maxDepth to enable setting via preconfig. Temporary changes at runtime must change QUnit.dump.maxDepth instead. | QUnit 1.16 | Introduce QUnit.dump.maxDepth.