You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code works. But once I change the variable name from "mockRequestHandler" to "requestHandler" or "requestHandlerMock" Jest throws an exception:
babel-plugin-jest-hoist: The module factory of `jest.mock()` is not allowed to reference any out-of-scope variables.
Invalid variable access: requestHandlerMock
The text was updated successfully, but these errors were encountered:
Yeah, this is expected. Since we hoist jest.mock calls, most initializing code does not run. You can tell Jest that you know what you're doing by prefixing the variable with mock
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Hello, kind people!
I'm very puzzled at the moment with the following behaviour:
This code works. But once I change the variable name from "mockRequestHandler" to "requestHandler" or "requestHandlerMock" Jest throws an exception:
The text was updated successfully, but these errors were encountered: