From 71c422ffb16d34e83dc5b247ff608310fb7b9889 Mon Sep 17 00:00:00 2001 From: Hugh Willson Date: Thu, 19 Jul 2018 09:19:19 -0400 Subject: [PATCH] Test change to line it up with the exact error in meteorhacks#247 --- tests/hijack/subscriptions.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/hijack/subscriptions.js b/tests/hijack/subscriptions.js index e3e8b376..8bd2c8a4 100644 --- a/tests/hijack/subscriptions.js +++ b/tests/hijack/subscriptions.js @@ -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; } } );