Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(utils): Clone
RegExp
values with new RegExp
instead of `struc…
…turedClone` (fix #19245, fix #18875) - Jest appears to provide its own global `structuredClone` that modifies `RegExp`s in such a way that they fail `instanceof RegExp` checks, causing an error in a rollup plugin used by `vite` (and likely elsewhere). `new RegExp` seems to correctly clone `RegExp`s in Jest.
- Loading branch information