Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save craigtaub/c8550c0e20a8e3bb1333c4a8718e4b82 to your computer and use it in GitHub Desktop.
Save craigtaub/c8550c0e20a8e3bb1333c4a8718e4b82 to your computer and use it in GitHub Desktop.
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