diff --git a/src/web/hooks/__tests__/useFilterSortBy.jsx b/src/web/hooks/__tests__/useFilterSortBy.jsx new file mode 100644 index 0000000000..263bad2164 --- /dev/null +++ b/src/web/hooks/__tests__/useFilterSortBy.jsx @@ -0,0 +1,67 @@ +/* SPDX-FileCopyrightText: 2024 Greenbone AG + * + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +/* eslint-disable react/prop-types */ + +import {describe, test, expect, testing} from '@gsa/testing'; + +import {fireEvent, render, screen} from 'web/utils/testing'; + +import Filter from 'gmp/models/filter'; + +import useFilterSortBy from '../useFilterSortBy'; + +const TestComponent = ({filter, changeFilter}) => { + const [sortBy, sortDir, sortChange] = useFilterSortBy(filter, changeFilter); + return ( + <> + {sortBy} + {sortDir} +