QUnit.dump.parse( data )
Description: Advanced and extensible data dumping for JavaScript
-
QUnit.dump.parse( data )
-
dataType: ObjectData structure or Object to parse.
-
This method does string serialization by parsing data structures and objects. It parses DOM elements to a string representation of their outer HTML. By default, nested structures will be displayed up to five levels deep. Anything beyond that is replaced by [object Object] and [object Array] placeholders.
If you need more or less output, change the value of QUnit.dump.maxDepth, representing how deep the elements should be parsed.
Note: This method used to be in QUnit.jsDump, which was changed to QUnit.dump. The old property will be removed in QUnit 3.0.
Examples:
The following example is used on grunt-contrib-qunit to send messages from QUnit to PhantomJS.
|
1
2
3
4
5
6
7
8
9
|
|
This example shows the parsed output of a simple JS object with a DOM reference.
|
1
2
3
4
5
6
|
|
Limit output to one or two levels
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
|