Skip to content

Commit

Permalink
Test change to line it up with the exact error in meteorhacks#247
Browse files Browse the repository at this point in the history
  • Loading branch information
hwillson committed Jul 19, 2018
1 parent 3ae4567 commit 71c422f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/hijack/subscriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,25 @@ Tinytest.add(
test.isNotUndefined(error1.stack.source);

// Invalid error should be ignored
var getInfo = Kadira._getInfo;
Kadira._getInfo = function () {
return {
trace: {
id: 'abc123',
events: [{
key: 'value',
}],
},
};
};

subscription._subscriptionId = 'abc123';
try {
subscription.error(undefined);
} catch (error) {
test.fail('Invalid errors should not throw an exception');
} finally {
Kadira._getInfo = getInfo;
}
}
);

0 comments on commit 71c422f

Please sign in to comment.