Skip to content

Commit

Permalink
Remove usage of QUnit.jsDump
Browse files Browse the repository at this point in the history
`QUnit.jsDump` was renamed to `QUnit.dump` as of `QUnit 2.0.0`
  • Loading branch information
Arkni committed Apr 4, 2017
1 parent 353a7a8 commit f45b682
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions phantomjs/bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,12 @@
if (obj.message === '[object Object], undefined:undefined') { return; }

// Parse some stuff before sending it.
var actual, expected, dump;
var actual, expected;
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 = dump.parse(obj.actual);
expected = dump.parse(obj.expected);
actual = QUnit.dump.parse(obj.actual);
expected = QUnit.dump.parse(obj.expected);
}
// Send it.
sendMessage('qunit.log', obj.result, actual, expected, obj.message, obj.source, obj.todo);
Expand Down Expand Up @@ -70,4 +65,4 @@
QUnit.done(function(obj) {
sendMessage('qunit.done', obj.failed, obj.passed, obj.total, obj.runtime);
});
}));
}));

0 comments on commit f45b682

Please sign in to comment.