From c79faa211c90b222658585858c760dbabb07fa5a Mon Sep 17 00:00:00 2001 From: Syneva Date: Fri, 13 Nov 2020 08:36:18 -0500 Subject: [PATCH] fix: Improved error messaging for toHaveFocus assertion (#304) * Improved error message for toHaveFocus assertion * Updated error message Co-authored-by: Syneva Runyan Co-authored-by: syneva-runyan --- src/to-have-focus.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/to-have-focus.js b/src/to-have-focus.js index 8d4eefdc..3b1b1acc 100644 --- a/src/to-have-focus.js +++ b/src/to-have-focus.js @@ -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') },