Mis códigos son:
utils.js:
exports.a = function a(){ b() } function b() {} exports.b = function b(){ }utils.prueba.js:
var utils = require('./utils') test('b called by a', () => { ub = jest.fn() utils.a() expect(utils.b).toHaveBeenCalled() })Cuando se ejecuta la prueba unitaria, falló con:
Expected number of calls: >= 1 Received number of calls: 0¿Cómo probarlo de forma correcta?