Skip to content

Commit

Permalink
Change QUnit.jsDump to QUnit.dump
Browse files Browse the repository at this point in the history
This property used to be `QUnit.jsDump`, and was changed to `QUnit.dump`.
The old property will be removed in QUnit 2.0.

Closes #111
  • Loading branch information
Arkni authored and jzaefferer committed Feb 5, 2016
1 parent 0a92929 commit cb12102
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions phantomjs/bridge.js
Expand Up @@ -33,12 +33,17 @@
if (obj.message === '[object Object], undefined:undefined') { return; }

// Parse some stuff before sending it.
var actual, expected;
var actual, expected, dump;
if (!obj.result) {
// In order to maintain backwards compatibility with `QUnit <1.15.0`
// Older versions of QUnit (`<1.15.0`) use `QUnit.jsDump`, but this poperty was
// deprecated and moved to `QUnit.dump` and will be removed in `QUnit 2.0`.
dump = QUnit.dump || QUnit.jsDump;

// Dumping large objects can be very slow, and the dump isn't used for
// passing tests, so only dump if the test failed.
actual = QUnit.jsDump.parse(obj.actual);
expected = QUnit.jsDump.parse(obj.expected);
actual = dump.parse(obj.actual);
expected = dump.parse(obj.expected);
}
// Send it.
sendMessage('qunit.log', obj.result, actual, expected, obj.message, obj.source);
Expand Down

0 comments on commit cb12102

Please sign in to comment.