Playwright · Junior · Question 41 of 75
How do you run only one test while developing?
- 1Add
// @onlyabove the chosen test - 2Rename all other test files to
.bak - 3Temporarily use
test.only(...)
Show the answer
Correct answer: Temporarily use test.only(...)
Explanation
test.only focuses a test or describe block. Setting forbidOnly: !!process.env.CI in the config prevents it from slipping into CI.