Skip to content

Commit 5884e4a

Browse files
authored
chore(expect): update docblock for toContain() to display info on substring check (#15789)
1 parent c023e26 commit 5884e4a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## main
22

3+
# Chore
4+
5+
- `[expect]` Update docblock for `toContain()` to display info on substring check ([#15789](https://github.com/jestjs/jest/pull/15789))
6+
37
## 30.0.5
48

59
### Features

packages/expect/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ export interface Matchers<R extends void | Promise<void>, T = unknown> {
209209
/**
210210
* Used when you want to check that an item is in a list.
211211
* For testing the items in the list, this uses `===`, a strict equality check.
212+
* `.toContain` can also check whether a string is a substring of another string.
212213
*/
213214
toContain(expected: unknown): R;
214215
/**

0 commit comments

Comments
 (0)