Closed
Description
Would be cool if we had access in beforeEach
hook to additional arguments that can be passed to each test. Kinda like it's demonstrated in macros docs. This would allow beforeEach
hook parametrisation. Like in the example below:
test.beforeEach(async (t, args) => {
if (args.initDb) {
// initialise db
}
});
test('my test with args', async t => {
}, {
initDb: true
});
There is a $40.00 open bounty on this issue. Add more on Issuehunt.
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on Issuehunt to raise funds.