[Jest] Override original module file with requireActual
jest.mock('./filename', () => {
const originalModule = jest.requireActual('./filename')
return {
...originalModule,
fnA: jest.fn(),
fnB: (b: boolean): boolean => b,
}
})
jest.mock('./filename', () => {
const originalModule = jest.requireActual('./filename')
return {
...originalModule,
fnA: jest.fn(),
fnB: (b: boolean): boolean => b,
}
})