Changed strategy: RequireJS has a lot of limitations to build modules that needs to be run in ndoe for unit testing and they are targeted to run in a browser. Trying with browserify now.