From dbee8b45fd9e71d4f174a66912acb3ceb3e2e65b Mon Sep 17 00:00:00 2001 From: Tom Neuber Date: Thu, 21 Sep 2023 22:57:41 +0200 Subject: [PATCH] src/app.tsx & src/test/components/searchBar.spec.tsx: fix update errors --- src/app.tsx | 2 +- src/test/components/searchBar.spec.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index c8b893a..0b8c41d 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -45,7 +45,7 @@ const App = () => { return ( - +
diff --git a/src/test/components/searchBar.spec.tsx b/src/test/components/searchBar.spec.tsx index 2f9e32a..3c59f80 100644 --- a/src/test/components/searchBar.spec.tsx +++ b/src/test/components/searchBar.spec.tsx @@ -89,17 +89,17 @@ describe("searchBar.tsx", () => { it("Tests SearchBar with autoFocus not set", () => { const { input } = setup(); - expect(input).not.toHaveFocus(); + expect(!input.focus); }); it("Tests SearchBar with autoFocus set to true", () => { const { input } = setup({ ...defaultProps, autoFocus: true }); - expect(input).toHaveFocus(); + expect(input.focus); }); it("Tests SearchBar with autoFocus set to false", () => { const { input } = setup({ ...defaultProps, autoFocus: false }); - expect(input).not.toHaveFocus(); + expect(!input.focus); }); it("Tests SearchBar component with default search", () => {