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 94af4c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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 94af4c3

Please sign in to comment.