Regression test for 'undefined is not a function' with missing callback on mocks