Skip to content

Commit

Permalink
Merge pull request #190 from ef4/better-messages-on-phantomjs
Browse files Browse the repository at this point in the history
Better exception messages on phantomjs
  • Loading branch information
rwjblue committed Sep 17, 2015
2 parents 71b5013 + c07a136 commit 3498c49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/ember-qunit/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ export default function test(testName, callback) {
var message;
if (reason instanceof Error) {
message = reason.stack;
if (reason.message && message.indexOf(reason.message) < 0) {
// PhantomJS has a `stack` that does not contain the actual
// exception message.
message = Ember.inspect(reason) + "\n" + message;
}
} else {
message = Ember.inspect(reason);
}
Expand Down

0 comments on commit 3498c49

Please sign in to comment.