Playwright · Junior · Question 44 of 75

What does test.fail() mean?

Show the answer

Correct answer: The test is expected to fail; passing is reported as an error

Explanation

It marks known bugs: Playwright runs the test and complains if it unexpectedly passes, signalling the bug may be fixed.

Further reading

Problem with a question

Playwright · Junior · question 44

Test yourself

Take the Playwright · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz