From 3cade3796709fde8016e553bdb9c5fb345f267e5 Mon Sep 17 00:00:00 2001 From: Yury Saukou Date: Fri, 24 Nov 2023 14:20:48 +0400 Subject: [PATCH] fix lint issue --- .../hooks/useBuildQuery/useBuildQuery.js | 2 +- .../hooks/useBuildQuery/useBuildQuery.test.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Organizations/OrganizationsList/hooks/useBuildQuery/useBuildQuery.js b/src/Organizations/OrganizationsList/hooks/useBuildQuery/useBuildQuery.js index e0363d41..cfaf483f 100644 --- a/src/Organizations/OrganizationsList/hooks/useBuildQuery/useBuildQuery.js +++ b/src/Organizations/OrganizationsList/hooks/useBuildQuery/useBuildQuery.js @@ -15,7 +15,7 @@ const CUSTOM_SORT_MAP = { }; export const useBuildQuery = () => { - const stripes = useStripes() + const stripes = useStripes(); return useCallback(makeQueryBuilder( 'cql.allRecords=1', diff --git a/src/Organizations/OrganizationsList/hooks/useBuildQuery/useBuildQuery.test.js b/src/Organizations/OrganizationsList/hooks/useBuildQuery/useBuildQuery.test.js index 9bd85f41..66059d02 100644 --- a/src/Organizations/OrganizationsList/hooks/useBuildQuery/useBuildQuery.test.js +++ b/src/Organizations/OrganizationsList/hooks/useBuildQuery/useBuildQuery.test.js @@ -1,5 +1,3 @@ -import queryString from 'query-string'; - import { renderHook } from '@folio/jest-config-stripes/testing-library/react'; import { useStripes } from '@folio/stripes/core'; import { @@ -30,13 +28,15 @@ describe('useBuildQuery', () => { it('should return function, that return query', () => { const { result } = renderHook(() => useBuildQuery()); - expect(result.current(queryString.parse('?foo=bar'))).toBe('(foo=="bar") sortby name/sort.ascending'); + expect(result.current({ + [SEARCH_PARAMETER]: 'bar', + [SEARCH_INDEX_PARAMETER]: 'foo', + })).toBe('(((foo=bar*))) sortby name/sort.ascending'); }); describe('Banking information', () => { const params = { [SEARCH_PARAMETER]: 'qwerty', - [SEARCH_INDEX_PARAMETER]: 'name', }; it('should include banking information index in the query if a user has the appropriate permission', () => {