Skip to content

Commit c79faa2

Browse files
syneva-runyanSyneva Runyansyneva-runyan
authored
fix: Improved error messaging for toHaveFocus assertion (#304)
* Improved error message for toHaveFocus assertion * Updated error message Co-authored-by: Syneva Runyan <syneva.runyan@mailchimp.com> Co-authored-by: syneva-runyan <srunyan3@gatech.edu>
1 parent c11f9c5 commit c79faa2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/to-have-focus.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ export function toHaveFocus(element) {
1313
'',
1414
),
1515
'',
16-
'Expected',
16+
'Expected element with focus:',
1717
` ${this.utils.printExpected(element)}`,
18-
'Received:',
18+
'Received element with focus:',
1919
` ${this.utils.printReceived(element.ownerDocument.activeElement)}`,
2020
].join('\n')
2121
},

0 commit comments

Comments
 (0)