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
after upgrading from jest 27.0.6 to 27.2.0 (also fails with 27.1.1) the following code no longer invokes the mocked function
import{mocked}from"ts-jest/utils";import*asconfigfrom"../config";jest.mock("../config");it("should be able to override getBoolean",()=>{constconfigGetMock=mocked(config.getBoolean).mockImplementation(()=>{console.log("called mock");returntrue;});jest.isolateModules(()=>{require("../uses-config");});expect(configGetMock).toBeCalledTimes(1);});
🐛 Bug Report
after upgrading from jest 27.0.6 to 27.2.0 (also fails with 27.1.1) the following code no longer invokes the mocked function
To Reproduce
see https://github.com/rburgst/ts-jest-27.1
Steps to reproduce the behavior:
just check out the repo and run
yarn install yarn test
Expected behavior
if you load a file in the test using
jest.isolateModules
then as of jest 27.1.0 this no longer works together with amocked
method.Link to repo (highly encouraged)
https://github.com/rburgst/ts-jest-27.1
Debug log:
ts-jest.log
envinfo
The text was updated successfully, but these errors were encountered: