Skip to content

Commit a9beb47

Browse files
authoredDec 6, 2021
fix: Improve toHaveClass error message format (#405)
1 parent 6f69437 commit a9beb47

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/to-have-class.js

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ export function toHaveClass(htmlElement, ...params) {
4242
const to = this.isNot ? 'not to' : 'to'
4343
return getMessage(
4444
this,
45+
this.utils.matcherHint(
46+
`${this.isNot ? '.not' : ''}.toHaveClass`,
47+
'element',
48+
this.utils.printExpected(expected.join(' ')),
49+
),
4550
`Expected the element ${to} have EXACTLY defined classes`,
4651
expected.join(' '),
4752
'Received',

0 commit comments

Comments
 (0)
Please sign in to comment.