From 7ece690e77103105945f4ec18727cc9cca91c7dc Mon Sep 17 00:00:00 2001 From: Dmytro Melnyshyn Date: Mon, 2 Dec 2024 09:58:32 +0200 Subject: [PATCH] fix test --- src/views/BrowseInventory/BrowseInventory.test.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/views/BrowseInventory/BrowseInventory.test.js b/src/views/BrowseInventory/BrowseInventory.test.js index 8d2ab1eb1..b5240e420 100644 --- a/src/views/BrowseInventory/BrowseInventory.test.js +++ b/src/views/BrowseInventory/BrowseInventory.test.js @@ -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(); });