Skip to content

Commit

Permalink
Merge pull request #1976 from iclanzan/patch-1
Browse files Browse the repository at this point in the history
Simplify function call.
  • Loading branch information
danielstjules committed Dec 25, 2015
2 parents a61b1f3 + 5a18d67 commit 4f26ce7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,13 @@ Mocha.prototype.ui = function(name) {
Mocha.prototype.loadFiles = function(fn) {
var self = this;
var suite = this.suite;
var pending = this.files.length;
this.files.forEach(function(file) {
file = path.resolve(file);
suite.emit('pre-require', global, file, self);
suite.emit('require', require(file), file, self);
suite.emit('post-require', global, file, self);
--pending || (fn && fn());
});
fn && fn();
};

/**
Expand Down

0 comments on commit 4f26ce7

Please sign in to comment.