Using jest.mock()
does not work properly with consistent-function-scoping
as it's not allowed to reference any out of scope variables as mocked function.
ReferenceError: /__tests__/search.spec.tsx: The module factory of `jest.mock()` is not allowed to reference any out-of-scope variables.
jest.mock("next/dynamic", () => () => "dynamic-drawer");
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too