src/app.tsx & src/test/components/searchBar.spec.tsx: fix update errors

This commit is contained in:
Tom Neuber 2023-09-21 22:57:41 +02:00
parent 7c39446aca
commit fa3890e2ea
Signed by: tom
GPG key ID: F17EFE4272D89FF6
2 changed files with 4 additions and 4 deletions

View file

@ -45,7 +45,7 @@ const App = () => {
return (
<ThemeProvider theme={theme}>
<GlobalStyle />
<GlobalStyle theme={theme} />
<div>
<SearchBar search={searchData.response} />
<Settings themes={themeData.response} search={searchData.response} />

View file

@ -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", () => {