Skip to content

Commit

Permalink
Revert usage of structuredClone
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettjstevens committed Nov 19, 2024
1 parent b9c9bab commit 5e6f782
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jest.mock('jsonpath', () => {
...original,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
query: jest.fn((obj: any, pathExpression: string, count?: number) => {
const newObj = obj instanceof Object ? obj : structuredClone(obj)
const newObj =
obj instanceof Object ? obj : JSON.parse(JSON.stringify(obj))
return original.query(newObj, pathExpression, count)
}),
}
Expand Down

0 comments on commit 5e6f782

Please sign in to comment.