Skip to content

Commit 45c1746

Browse files
ahnpnlrickhanlonii
authored andcommitted
[expect] correct documentation for stringMatching, not.stringMatching to be in sync with Flow type (jestjs#5927)
* Correct doc for stringmatching, not stringmatching and some grammar mistakes * Adjust doc according to PR review * Correct the explanation again
1 parent 1a51672 commit 45c1746

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

docs/ExpectAPI.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ describe('not.objectContaining', () => {
318318

319319
### `expect.not.stringContaining(string)`
320320

321-
`expect.not.stringContaining(string)` matches any received string that does not
321+
`expect.not.stringContaining(string)` matches the received string that does not
322322
contain the exact expected string.
323323

324324
It is the inverse of `expect.stringContaining`.
@@ -333,9 +333,9 @@ describe('not.stringContaining', () => {
333333
});
334334
```
335335

336-
### `expect.not.stringMatching(regexp)`
336+
### `expect.not.stringMatching(string | regexp)`
337337

338-
`expect.not.stringMatching(regexp)` matches any received string that does not
338+
`expect.not.stringMatching(string | regexp)` matches the received string that does not
339339
match the expected regexp.
340340

341341
It is the inverse of `expect.stringMatching`.
@@ -379,12 +379,12 @@ test('onPress gets called with the right thing', () => {
379379

380380
### `expect.stringContaining(string)`
381381

382-
`expect.stringContaining(string)` matches any received string that contains the
382+
`expect.stringContaining(string)` matches the received string that contains the
383383
exact expected string.
384384

385-
### `expect.stringMatching(regexp)`
385+
### `expect.stringMatching(string | regexp)`
386386

387-
`expect.stringMatching(regexp)` matches any received string that matches the
387+
`expect.stringMatching(string | regexp)` matches the received string that matches the
388388
expected regexp.
389389

390390
You can use it instead of a literal value:

0 commit comments

Comments
 (0)