diff --git a/docs/src/test-assertions-js.md b/docs/src/test-assertions-js.md index 9a42810c65..162d0351eb 100644 --- a/docs/src/test-assertions-js.md +++ b/docs/src/test-assertions-js.md @@ -276,12 +276,12 @@ export const expect = baseExpect.extend({ } const message = pass - ? () => this.utils.matcherHint(assertionName, undefined, undefined, { isNot: true }) + + ? () => this.utils.matcherHint(assertionName, undefined, undefined, { isNot: this.isNot }) + '\n\n' + `Locator: ${locator}\n` + `Expected: not ${this.utils.printExpected(expected)}\n` + (matcherResult ? `Received: ${this.utils.printReceived(matcherResult.actual)}` : '') - : () => this.utils.matcherHint(assertionName, undefined, undefined, { isNot: false }) + + : () => this.utils.matcherHint(assertionName, undefined, undefined, { isNot: this.isNot }) + '\n\n' + `Locator: ${locator}\n` + `Expected: ${this.utils.printExpected(expected)}\n` +