src/app.tsx & src/test/components/searchBar.spec.tsx: fix update errors
This commit is contained in:
parent
edd4e900de
commit
dbee8b45fd
2 changed files with 4 additions and 4 deletions
|
@ -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} />
|
||||
|
|
|
@ -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", () => {
|
||||
|
|
Loading…
Reference in a new issue