From 1432c406ad4b93845c1054af389d437e4b63f7b1 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Wed, 22 Feb 2023 00:38:30 +0100 Subject: [PATCH] docs: fix toMatch code snippet typo (#21077) Fixes https://github.com/microsoft/playwright/issues/21014 --- docs/src/api/class-genericassertions.md | 2 +- packages/playwright-test/types/test.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 { * * ```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.