This function creates a hook that runs before each test in the current suite.
describe('tests', async () => {
beforeEach(() => console.log('about to run a test'));
it('is a subtest', () => {
// Some relevant assertion here
});
});
function
This function creates a hook that runs before each test in the current suite.
describe('tests', async () => {
beforeEach(() => console.log('about to run a test'));
it('is a subtest', () => {
// Some relevant assertion here
});
});
The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
Configuration options for the hook.