While this mocks setup works for just the require()'d modules (the `modules` pass as first arg to testRequire), it does not hold for any sub-dependencies underneath them that may ask for the same module ID that is being mocked. 

If you want it to apply to all modules in the dependency tree: it may be better to set map['*'] for all the mocks, then have a map config for each mock that sets the mocked ID to point to the real module ID. That probably is not very clear, but this is what the email one was trying to express.

Related, it may make sense for the options.mocks to just be an array of module IDs that automatically get the 'mocks/' ID prefix attached to them, then have this config wired up. That just cuts down on boilerplate for the individual tests to write. It would then just be `mocks: ['alarmsdb', 'alarm_list', 'alarm_manager']`.