Skip to content

Commit

Permalink
fix: Improved error messaging for toHaveFocus assertion (#304)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people committed Nov 13, 2020
1 parent c11f9c5 commit c79faa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/to-have-focus.js
Expand Up @@ -13,9 +13,9 @@ export function toHaveFocus(element) {
'',
),
'',
'Expected',
'Expected element with focus:',
` ${this.utils.printExpected(element)}`,
'Received:',
'Received element with focus:',
` ${this.utils.printReceived(element.ownerDocument.activeElement)}`,
].join('\n')
},
Expand Down

0 comments on commit c79faa2

Please sign in to comment.