Skip to content

Commit

Permalink
Setup root hook to clean up config files
Browse files Browse the repository at this point in the history
  • Loading branch information
lewissteele committed Sep 16, 2024
1 parent 4a85e2b commit f41a371
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
},
"mocha": {
"recursive": true,
"require": "test/hooks.js"
"require": "test/root-hook"
}
}
6 changes: 6 additions & 0 deletions test/root-hook.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const fs = require("fs-extra");

exports.mochaHooks = {
beforeAll: () => (global.config = { configDir: "config" }),
afterAll: () => fs.remove("config"),
};

0 comments on commit f41a371

Please sign in to comment.