Please see an example repository at https://github.com/iammerrick/mocha-rjs-fail.
The Problem
Mocha.js installs a global called process see here. A comment says it is only to allow mocha.js to run untouched, not to allow running node code in the browser, however this has some unfortunate side effects for some libraries that use process for environment detection.
r.js is one of those libraries that uses process for environment detection see here.
Please see an example repository at https://github.com/iammerrick/mocha-rjs-fail.
The Problem
Mocha.js installs a global called
processsee here. A comment says it is only to allow mocha.js to run untouched, not to allow running node code in the browser, however this has some unfortunate side effects for some libraries that useprocessfor environment detection.r.js is one of those libraries that uses
processfor environment detection see here.