Skip to content

Commit

Permalink
Make console & process globals available to ava.config.js files
Browse files Browse the repository at this point in the history
Fixes #2356.
  • Loading branch information
novemberborn committed Jan 12, 2020
1 parent efa8635 commit 15d73ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/load-config.js
Expand Up @@ -25,6 +25,8 @@ const evaluateJsConfig = (configFile, fileForErrorMessage) => {
});
return {
default: script.runInNewContext({
console,
process,
get __dirname() {
throw new LegacyCommonJsAccessError('__dirname', fileForErrorMessage);
},
Expand Down

0 comments on commit 15d73ca

Please sign in to comment.