Playwright · Middle · Question 10 of 75
What is a worker-scoped fixture?
- 1Set up once per worker process and shared by its tests
- 2A fixture that only runs in the main process
- 3A fixture limited to one test, then thrown away
Show the answer
Correct answer: Set up once per worker process and shared by its tests
Explanation
Declare it with { scope: 'worker' }. It suits expensive things like a test account or a started service, shared by all tests in that worker.