Skip to content

Commit

Permalink
docs: Fix variable name in custom-matcher-api code example (#8581)
Browse files Browse the repository at this point in the history
  • Loading branch information
tohjustin committed Jun 19, 2019
1 parent 85d9698 commit 932335c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -22,6 +22,7 @@
- `[docs]` Add example to `jest.requireActual` ([#8482](https://github.com/facebook/jest/pull/8482)
- `[docs]` Add example to `jest.mock` for mocking ES6 modules with the `factory` parameter ([#8550](https://github.com/facebook/jest/pull/8550))
- `[docs]` Add information about using `jest.doMock` with ES6 imports ([#8573](https://github.com/facebook/jest/pull/8573))
- `[docs]` Fix variable name in custom-matcher-api code example ([#8582](https://github.com/facebook/jest/pull/8582))

### Performance

Expand Down
4 changes: 2 additions & 2 deletions docs/ExpectAPI.md
Expand Up @@ -172,13 +172,13 @@ expect.extend({
`Expected: ${this.utils.printExpected(expected)}\n` +
`Received: ${this.utils.printReceived(received)}`
: () => {
const difference = diff(expected, received, {
const diffString = diff(expected, received, {
expand: this.expand,
});
return (
this.utils.matcherHint('toBe', undefined, undefined, options) +
'\n\n' +
(difference && difference.includes('- Expect')
(diffString && diffString.includes('- Expect')
? `Difference:\n\n${diffString}`
: `Expected: ${this.utils.printExpected(expected)}\n` +
`Received: ${this.utils.printReceived(received)}`)
Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-24.0/ExpectAPI.md
Expand Up @@ -173,13 +173,13 @@ expect.extend({
`Expected: ${this.utils.printExpected(expected)}\n` +
`Received: ${this.utils.printReceived(received)}`
: () => {
const difference = diff(expected, received, {
const diffString = diff(expected, received, {
expand: this.expand,
});
return (
this.utils.matcherHint('toBe', undefined, undefined, options) +
'\n\n' +
(difference && difference.includes('- Expect')
(diffString && diffString.includes('- Expect')
? `Difference:\n\n${diffString}`
: `Expected: ${this.utils.printExpected(expected)}\n` +
`Received: ${this.utils.printReceived(received)}`)
Expand Down

0 comments on commit 932335c

Please sign in to comment.