I am working with playwright e2e testing, and I noticed that when trying to use beforeEach as a function of my own without destructing the page from the args property
test.beforeEach((args, testInfo) => {
console.log('heyo');
});
i got the following error:
npm run test
> [email protected] test
> playwright test
Error: First argument must use the object destructuring pattern: args
defined at playwright/appName.test.ts:7:8
I want to have the same functionality in my functions (to enforce using destructuring) how can I achieve this?
I tried digging through the playwright code to understand how they did it without success.