sho nuff, it would be useful to have a more featureful mocking/patching setup for writing JS tests. The difficulty is in providing a mocked callable that can return what you need but also keep track of what arguments it was called with.