Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro-Melnyshyn committed Dec 2, 2024
1 parent 230e528 commit 7ece690
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/views/BrowseInventory/BrowseInventory.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,17 @@ describe('BrowseInventory', () => {

it('should have search prop in SearchModeNavigation component', () => {
const search = '?qindex=title&query=book&sort=title';
const state = {
isSearchToggleHitInBrowse: true,
};

mockGetLastSearch.mockClear().mockImplementation(() => search);
renderBrowseInventory();

expect(SearchModeNavigation).toHaveBeenCalledWith({ search }, {});
expect(SearchModeNavigation).toHaveBeenCalledWith({
search,
state,
}, {});
mockGetLastSearch.mockRestore();
});

Expand Down

0 comments on commit 7ece690

Please sign in to comment.