diff --git a/docs/ExpectAPI.md b/docs/ExpectAPI.md index 1e68c40f6e47..deae14f8edf5 100644 --- a/docs/ExpectAPI.md +++ b/docs/ExpectAPI.md @@ -110,7 +110,7 @@ test('is divisible by external value', async () => { #### Custom Matchers API -Matchers should return an object (or a Promise of an object) with two keys. `pass` indicates whether there was a match or not, and `message` provides a function with no arguments that return an error message in case of failure. Thus, when `pass` is false, `message` should return the error message for when `expect(x).yourMatcher()` fails. And when `pass` is true, `message` should return the error message for when `expect(x).not.yourMatcher()` fails. +Matchers should return an object (or a Promise of an object) with two keys. `pass` indicates whether there was a match or not, and `message` provides a function with no arguments that returns an error message in case of failure. Thus, when `pass` is false, `message` should return the error message for when `expect(x).yourMatcher()` fails. And when `pass` is true, `message` should return the error message for when `expect(x).not.yourMatcher()` fails. Matchers are called with the argument passed to `expect(x)` followed by the arguments passed to `.yourMatcher(y, z)`: diff --git a/website/versioned_docs/version-26.2/ExpectAPI.md b/website/versioned_docs/version-26.2/ExpectAPI.md index 72352b09b8f4..1dab1f082084 100644 --- a/website/versioned_docs/version-26.2/ExpectAPI.md +++ b/website/versioned_docs/version-26.2/ExpectAPI.md @@ -111,7 +111,7 @@ test('is divisible by external value', async () => { #### Custom Matchers API -Matchers should return an object (or a Promise of an object) with two keys. `pass` indicates whether there was a match or not, and `message` provides a function with no arguments that return an error message in case of failure. Thus, when `pass` is false, `message` should return the error message for when `expect(x).yourMatcher()` fails. And when `pass` is true, `message` should return the error message for when `expect(x).not.yourMatcher()` fails. +Matchers should return an object (or a Promise of an object) with two keys. `pass` indicates whether there was a match or not, and `message` provides a function with no arguments that returns an error message in case of failure. Thus, when `pass` is false, `message` should return the error message for when `expect(x).yourMatcher()` fails. And when `pass` is true, `message` should return the error message for when `expect(x).not.yourMatcher()` fails. Matchers are called with the argument passed to `expect(x)` followed by the arguments passed to `.yourMatcher(y, z)`: