Karma shims Javascript global objects?

12 views
Skip to first unread message

Nate Rook

unread,
Nov 17, 2017, 1:11:25 PM11/17/17
to karma-users
I noticed recently that including Karma shims some standard Javascript methods, such as Promise.try. I was very surprised to find this out, and indeed, my team had some code that passed tests but didn't work in prod, because it used one of these methods.

This doesn't seem like safe. Would the Karma team be amenable to importing core-js in a way that doesn't affect the global namespace?

johnjbarton johnjbarton

unread,
Nov 17, 2017, 1:19:52 PM11/17/17
to karma-users
On Friday, November 17, 2017 at 10:11:25 AM UTC-8, Nate Rook wrote:
I noticed recently that including Karma shims some standard Javascript methods, such as Promise.try. I was very surprised to find this out, and indeed, my team had some code that passed tests but didn't work in prod, because it used one of these methods.

This doesn't seem like safe. Would the Karma team be amenable to importing core-js in a way that doesn't affect the global namespace?


Could you point out the code that you think causes this issue? 

Nate Rook

unread,
Nov 17, 2017, 1:57:31 PM11/17/17
to karma-users
Now that I look, I see the issue is fixed in master. I'm sorry, I should have checked this before sending the first email.

I'll excitedly await the next release!

Reply all
Reply to author
Forward
0 new messages