I have one file called helper.js that consist of two functions
export const funcA = (key) => { return funcB(key) }; export const func
I create a kind of nameSpace to handle this issue:
let helper = {} const funcA = (key) => { return helper.funcB(key) }; const funcB = (key,prop) => { return someObj; }; helper = { funcA, funcB } module.exports = helper
and then mocking is obvious with jest.fn
jest.fn