Thanks Olivier,
I have some comment based on my current fight in the same setup.
1 - I am trying to have a solution working locally on browser (where the devs will look most of the time while testing) and on jstd (before committing, just checking that did not forget anything and CI is working). This double requirement is creating me huge problems, you will see in the following and perhaps you could advise me.
2 - the point of requirejs is to let it resolve dependencies from the define/require we use in our modules, however, jstd is not able to do that (at least in my case, which should be the generic one). Basically, I do NOT manually load the modules under tests, because requirejs is supposed to do that, and apparently it does, but incorrectly. From the debugger, i see that as last action, but the module is loaded from some jstd temp dir, not from the path where all other modules are, and the file ends up not being a .js but an html with a syntax error "Uncaught SyntaxError: Unexpected token <".
3 - you are using named modules, and requireJS warns you about disadvantages with that. If I do NOT use names, and I load the modules in the html or jstd, there is an anonymous define() collision (basically my module is loaded twice and fails) "Uncaught Error: Mismatched anonymous define() module: function ($) { ...".
I am losing a lot of time on this issue, if somebody has any advice, please let me know.