I'm struggling to get Jasmine set up and module/require working correctly. As per the examples, I can require in controllers without problem using something like:
var user = require('../../app/controllers/users.server.controller');
However, this falls apart with require statements inside users.server.controller.js. In MEAN.JS the user controller is just an aggregation of several controllers:
module.exports = _.extend(
require('./users/users.authentication.server'),
require('./users/users.authorization.server'),
require('./users/users.password.server'),
require('./users/users.profile.server')
);
The relatives paths seem to be incorrect when running Jasmine leading to module not found errors:
module.js:340
throw err;
^
Error: Cannot find module './users/users.authentication.server'
at Function.Module._resolveFilename (module.js:338:15)
...
Am I doing something wrong here? Is there a way to configure this so I don't have to change this structure?