Playwright · Function
expect.extend
expect.extend adds custom assertions to Playwright. A matcher returns whether it passed and provides a failure message.
Last updated
Syntax
expect.extend({ matcherName(received, expected, options) { return { pass, message }; } })In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
expectexpect.configureexpect.pollexpect.toPasstestConfig.expecttoHaveAttribute