Skip to content

Commit

Permalink
feat(webpack): karma execution blocker
Browse files Browse the repository at this point in the history
 - Blocking on invalid, watch-run, and run events instead
  • Loading branch information
ibash authored and joshwiens committed Jan 14, 2017
1 parent 03f6495 commit d776068
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,14 @@ function Plugin(
compiler.plugin("make", this.make.bind(this));
}, this);

compiler.plugin("compile", function() {
isBlocked = true
["invalid", "watch-run", "run"].forEach(function(name) {
compiler.plugin(name, function(_, callback) {
isBlocked = true;

if (callback) {
callback();
}
})
})

compiler.plugin("done", function(stats) {
Expand Down

0 comments on commit d776068

Please sign in to comment.