-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
timer.setTimeout causes Illegal Invocation error in a limited execution environment #1519
Closed
schmuli opened this issue
Jul 27, 2015
· 3 comments
· May be fixed by Omrisnyk/npm-lockfiles#122 or Omrisnyk/npm-lockfiles#132
Closed
timer.setTimeout causes Illegal Invocation error in a limited execution environment #1519
schmuli opened this issue
Jul 27, 2015
· 3 comments
· May be fixed by Omrisnyk/npm-lockfiles#122 or Omrisnyk/npm-lockfiles#132
Comments
The main reason why those timers are injected is to be able to easily mock them during testing of Karma itself. If that turns out to be an issue in this scenario this is definitely a bug. |
I added a PR but one of the unit-tests are failing for some reason, which doesn't appear to have anything to do with the changes I made. |
@schmuli thanks I will check it out later |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am writing an Atom plugin for running Karma, which currently uses the Atom process to start the Karma server. I believe that Atom runs its plugins in a limited execution environment (I had a similar issue when loading the karma plugin, but found an Atom-specific workaround).
However, I keep getting an Illegal Invocation exception in
lib/launchers/capture_timeout.js
on line 15, when trying to set a timeout. It appears that the exception is caused bysetTimeout
being called as a method of thetimer
object.Changing the timer definition in
lib/server.js
to delegate to thesetTimeout/clearTimeout
functions, rather than pass by reference, eliminates the exception.Is this a valid use-case for making a change in Karma's code base?
The text was updated successfully, but these errors were encountered: