chore(expect): clarify message() for custom matchers
This commit is contained in:
parent
4b7c8d8a20
commit
a9d78b49e3
|
|
@ -276,12 +276,12 @@ export const expect = baseExpect.extend({
|
|||
}
|
||||
|
||||
const message = pass
|
||||
? () => this.utils.matcherHint(assertionName, undefined, undefined, { isNot: this.isNot }) +
|
||||
? () => this.utils.matcherHint(assertionName, undefined, undefined, { isNot: true }) +
|
||||
'\n\n' +
|
||||
`Locator: ${locator}\n` +
|
||||
`Expected: ${this.isNot ? 'not' : ''}${this.utils.printExpected(expected)}\n` +
|
||||
`Expected: not ${this.utils.printExpected(expected)}\n` +
|
||||
(matcherResult ? `Received: ${this.utils.printReceived(matcherResult.actual)}` : '')
|
||||
: () => this.utils.matcherHint(assertionName, undefined, undefined, { isNot: this.isNot }) +
|
||||
: () => this.utils.matcherHint(assertionName, undefined, undefined, { isNot: false }) +
|
||||
'\n\n' +
|
||||
`Locator: ${locator}\n` +
|
||||
`Expected: ${this.utils.printExpected(expected)}\n` +
|
||||
|
|
|
|||
Loading…
Reference in a new issue