Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs: add the general rule to expect the opposite of the matchers (#9772)

Kenneth Luma72930a7bbd6
diff --git a/docs/src/test-assertions-js.md b/docs/src/test-assertions-js.md
index 5a8069e7cd..6e20a630fb 100644
--- a/docs/src/test-assertions-js.md
+++ b/docs/src/test-assertions-js.md
@@ -11,7 +11,13 @@ expect(success).toBeTruthy();
```
Playwright also extends it with convenience async matchers that will wait until
-the expected condition is met.
+the expected condition is met. In general, we can expect the opposite to be true by adding a `.not` to the front
+of the matchers:
+
+```js
+expect(value).not.toEqual(0);
+await expect(locator).not.toContainText("some text");
+```
<!-- TOC -->