function test.beforeEach
#beforeEach(fn?: HookFn,options?: HookOptions,): voidThis 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', () => {
assert.ok('some relevant assertion here');
});
});
Parameters #
The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
#options: HookOptions optional
Configuration options for the hook.
Return Type #
void