I don't really get this mock.

Can't you just use sinon to spy the functions?