React-Vitest: Mock useSearchParams using vitest – Reactjs
I am trying to mock useSearchParams using vitest. I have tried a couple of methods but couldn't find a solution. The sample code can be found here: https://codesandbox.io/p/sandbox/laughing-bas-m7ygo8 import { useEffect, useState } from "react"; import { useSearchParams } from…