karma-runner / karma-runner/karma

Add `karma.stop` api method

Open
#1,369 6 comments 0 reactions 0 assignees View on GitHub
needs: work type: feature
Dominant language
JavaScript
Stars
12k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

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:

```
if( karmaIsRunning ){
karma.stopRun(); //stops actively running tasks before starting a new set of tests.
}
karma.start(config, function(){});
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.