Skip to content

Commit

Permalink
[expect] correct documentation for stringMatching, not.stringMatching…
Browse files Browse the repository at this point in the history
… to be in sync with Flow type (#5927)

* Correct doc for stringmatching, not stringmatching and some grammar mistakes

* Adjust doc according to PR review

* Correct the explanation again
  • Loading branch information
ahnpnl authored and rickhanlonii committed Apr 11, 2018
1 parent 1a51672 commit 45c1746
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ describe('not.objectContaining', () => {

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

`expect.not.stringContaining(string)` matches any received string that does not
`expect.not.stringContaining(string)` matches the received string that does not
contain the exact expected string.

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

### `expect.not.stringMatching(regexp)`
### `expect.not.stringMatching(string | regexp)`

`expect.not.stringMatching(regexp)` matches any received string that does not
`expect.not.stringMatching(string | regexp)` matches the received string that does not
match the expected regexp.

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

### `expect.stringContaining(string)`

`expect.stringContaining(string)` matches any received string that contains the
`expect.stringContaining(string)` matches the received string that contains the
exact expected string.

### `expect.stringMatching(regexp)`
### `expect.stringMatching(string | regexp)`

`expect.stringMatching(regexp)` matches any received string that matches the
`expect.stringMatching(string | regexp)` matches the received string that matches the
expected regexp.

You can use it instead of a literal value:
Expand Down

0 comments on commit 45c1746

Please sign in to comment.