jest.mock('./filename', () => {
const originalModule = jest.requireActual('./filename')
return {
...originalModule,
fnA: jest.fn(),
fnB: (b: boolean): boolean => b,
}
})
标签:requireActual,Jest,originalModule,module,filename,jest From: https://www.cnblogs.com/Answer1215/p/16998984.html