Jest: Mocking a Function That Cannot be Redefined