You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.
As of mocha v8, it supports root hooks https://mochajs.org/#root-hook-plugins in order to be able to globally define before and after hooks that run either once before/after your suite or before/after each test.
Following the guides to create such a root hook i ended up with the following configuration:
// hooks.js
exports.mochaHooks = {
beforeAll() {
// my setup code here
}
};
But it didn't seem to work and my beforeAll hook never run. I also tried to specify a --require hooks.js in a mocha.opts file and then include it in my karma config as shown in the docs:
As of mocha v8, it supports root hooks https://mochajs.org/#root-hook-plugins in order to be able to globally define before and after hooks that run either once before/after your suite or before/after each test.
Following the guides to create such a root hook i ended up with the following configuration:
But it didn't seem to work and my
beforeAll
hook never run. I also tried to specify a--require hooks.js
in amocha.opts
file and then include it in my karma config as shown in the docs:Again my global hook never run.
Any insights on this?
The text was updated successfully, but these errors were encountered: