we have one actually ;)

MocksHelper's init method does just this. (but it wasn't at the time some test files were written).

I suggest to move the mocks_helper.js file that is in the Sms app (this is the most advanced mocks helper) to /shared/test/unit/mocks/ and use it everywhere. Should be backward compatible but add some sugar, eg:

https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/test/unit/thread_list_ui_test.js#L19-24
https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/test/unit/thread_list_ui_test.js#L29