diff --git a/docs/src/test-assertions-js.md b/docs/src/test-assertions-js.md index d8059190b6..defbc3a293 100644 --- a/docs/src/test-assertions-js.md +++ b/docs/src/test-assertions-js.md @@ -308,7 +308,7 @@ test('amount', async () => { }); ``` -### Compatibility with expect from Jest +### Compatibility with expect library :::note Do not confuse Playwright's `expect` with the [`expect` library](https://jestjs.io/docs/expect). The latter is not fully integrated with Playwright test runner, so make sure to use Playwright's own `expect`. diff --git a/packages/playwright/src/matchers/expect.ts b/packages/playwright/src/matchers/expect.ts index 4db9b39c70..3e49360eb7 100644 --- a/packages/playwright/src/matchers/expect.ts +++ b/packages/playwright/src/matchers/expect.ts @@ -185,7 +185,7 @@ function createExpect(info: ExpectMetaInfo) { } function throwUnsupportedExpectMatcherError() { - throw new Error('Playwright Expect matchers are not fully compatible with Jest matchers. See https://aka.ms/playwright/expect-compatibility'); + throw new Error('It looks like you are using custom expect matchers that are not compatible with Playwright. See https://aka.ms/playwright/expect-compatibility'); } expectLibrary.setState({ expand: false });