-
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
Add karma.stop
api method
#1369
Comments
Here's a PR which accomplishes the task. Please feel free to use it for its idea, not necessarily for the code. |
Are you only interested in stopping? If so would what is talked about here #136 suffice for you? That is only talking about a command line option, but I would add an api option for it as well at the same time probably. |
I'm interested in stopping a running task programmatically because I'm not using the command line. In my particular case I was using Gulp with gulp-karma. I found that it was nearly impossible to kill Karma in a nice way, and as the developer of gulp-karma states "Karma. just. won't. stop." [citation needed] I made this PR to give advanced developers and plugin developers a way to stop Karma in a semi-nice manner. #136 only accomplishes this for command-line runs. |
karma.stop
api method
Okay got it, I will probably use a different implementation, but I agree that we need to add this. |
Thanks! |
I am working on an Atom plugin for running Karma, and just ran into this issue as well. Up till now, I have run Karma in the same process as Atom, without spawning, and this appears to be working. However, when looking for a way to stop Karma, I ran into this issue. Even after looking at the recent API changes, including making the event emitter available, there still is not a way to stop Karma. Additionally, looking at the code in I should point out that I haven't found any clear documentation in Atom yet, but it may yet turn out to be a best practice to start such a plugin in a separate process, in which case I will just resort to killing the spawned process. |
In certain development cases there may be a large number of unit tests that take many seconds or minutes to run. In these cases the developer may be actively programming and saving, which could execute gulp watch events that force another unit test run. Currently when a set of unit tests is running Karma can execute another set asynchronously.
It would be nice if the developer could develop a method to stop a running task before starting a new one.
Example:
The text was updated successfully, but these errors were encountered: