From 0b3a64502b56d7fb2f3691110c406c194864e0d2 Mon Sep 17 00:00:00 2001 From: patricknazar Date: Thu, 29 Nov 2018 20:07:36 +1030 Subject: [PATCH] Fix Custom Matchers API example message property (#7426) * (fix) message should return a function message should return a function and not a constant * Update CHANGELOG.md --- CHANGELOG.md | 1 + docs/ExpectAPI.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53e61d3c7257..3b61e8407dbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -79,6 +79,7 @@ ### Chore & Maintenance +- `[docs]` Fix message property in custom matcher example to return a function instead of a constant. - `[jest-watcher]` Standardize filenames ([#7314](https://github.com/facebook/jest/pull/7314)) - `[jest-circus]` Standardize file naming in `jest-circus` ([#7301](https://github.com/facebook/jest/pull/7301)) - `[docs]` Add synchronous test.each setup ([#7150](https://github.com/facebook/jest/pull/7150)) diff --git a/docs/ExpectAPI.md b/docs/ExpectAPI.md index 35e645283fd9..73cd9a0594c1 100644 --- a/docs/ExpectAPI.md +++ b/docs/ExpectAPI.md @@ -107,7 +107,7 @@ expect.extend({ yourMatcher(x, y, z) { return { pass: true, - message: '', + message: () => '', }; }, });