Skip to content

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

docs: fix toMatch code snippet typo (#21077)

Max Schmitt1432c406ad4b
diff --git a/docs/src/api/class-genericassertions.md b/docs/src/api/class-genericassertions.md
index 575c46e58b..f93970bc25 100644
--- a/docs/src/api/class-genericassertions.md
+++ b/docs/src/api/class-genericassertions.md
@@ -413,7 +413,7 @@ Ensures that string value matches a regular expression.
```js
const value = 'Is 42 enough?';
-expect(value).toMatches(/Is \d+ enough/);
+expect(value).toMatch(/Is \d+ enough/);
```
### param: GenericAssertions.toMatch.expected
diff --git a/packages/playwright-test/types/test.d.ts b/packages/playwright-test/types/test.d.ts
index 8414206ff5..edc5acb3ab 100644
--- a/packages/playwright-test/types/test.d.ts
+++ b/packages/playwright-test/types/test.d.ts
@@ -4144,7 +4144,7 @@ interface GenericAssertions<R> {
*
* ```js
* const value = 'Is 42 enough?';
- * expect(value).toMatches(/Is \d+ enough/);
+ * expect(value).toMatch(/Is \d+ enough/);
* ```
*
* @param expected Regular expression to match against.