Skip to content

Commit 5fad565

Browse files
author
Hector Arce De Las Heras
committed
Modify the structuredClone methods
1 parent e2f2e0f commit 5fad565

File tree

4 files changed

+2
-12
lines changed

4 files changed

+2
-12
lines changed

src/components/inputSearch/__tests__/helpers.test.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ const options = [
1515
},
1616
];
1717

18-
global.structuredClone = jest.fn(val => {
19-
return JSON.parse(JSON.stringify(val));
20-
});
21-
2218
describe('Input Search Helpers', () => {
2319
test('Should filter options with value', async () => {
2420
const filteredOptions = [

src/components/inputSearch/__tests__/inputSearch.test.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ const mockProps = {
4141

4242
window.matchMedia = windowMatchMedia();
4343

44-
global.structuredClone = jest.fn(val => {
45-
return JSON.parse(JSON.stringify(val));
46-
});
47-
4844
describe('New Input Search Component', () => {
4945
it('Should render InputSearch component', async () => {
5046
const { container } = renderProvider(<InputSearch {...mockProps} open={true} />);

src/components/inputSearch/helpers/filterOptions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { structuredClone } from '@/utils';
2+
13
import { IOptionGroup, InputSearchFilterOptionReturnValue } from '../types';
24

35
// eslint-disable-next-line complexity

src/components/inputSearch/hooks/__tests__/useInputSearch.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ import { InputTypeType } from '@/types/inputType';
1111
import * as inputHooks from '../../../../hooks/useInput/useInput';
1212
import { useInputSearch } from '../useInputSearch';
1313

14-
global.structuredClone = jest.fn(val => {
15-
return JSON.parse(JSON.stringify(val));
16-
});
17-
1814
const options = [
1915
{
2016
options: ['option1', 'option2'],

0 commit comments

Comments
 (0)