Skip to content

Commit 78f48ef

Browse files
patricknazarcaptain-yossarian
authored andcommitted
Fix Custom Matchers API example message property (jestjs#7426)
* (fix) message should return a function message should return a function and not a constant * Update CHANGELOG.md
1 parent 823dca3 commit 78f48ef

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979

8080
### Chore & Maintenance
8181

82+
- `[docs]` Fix message property in custom matcher example to return a function instead of a constant.
8283
- `[jest-watcher]` Standardize filenames ([#7314](https://github.com/facebook/jest/pull/7314))
8384
- `[jest-circus]` Standardize file naming in `jest-circus` ([#7301](https://github.com/facebook/jest/pull/7301))
8485
- `[docs]` Add synchronous test.each setup ([#7150](https://github.com/facebook/jest/pull/7150))

docs/ExpectAPI.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ expect.extend({
107107
yourMatcher(x, y, z) {
108108
return {
109109
pass: true,
110-
message: '',
110+
message: () => '',
111111
};
112112
},
113113
});

0 commit comments

Comments
 (0)