Last active
May 26, 2020 12:03
-
-
Save craigtaub/c8550c0e20a8e3bb1333c4a8718e4b82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mocha.prototype.loadFilesAsync = async function () { | |
var self = this; | |
var suite = this.suite; | |
for (let file of this.files) { | |
// preload | |
suite.emit(Suite.constants.EVENT_FILE_PRE_REQUIRE, global, file, self); | |
// load | |
file = path.resolve(file); | |
const result = await require(file); | |
// postload events | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment