domenic/chai-as-promised — pull request #23 by jamiemill (2013-04-07 17:12:32+00:00)
Title: Make browser tests work with current versions of 'when' and 'Q'.

When I tried to run the browser tests, I found that they were broken for both "when" and "q".

This fixes problems with both:

"when": Doesn't seem to support being loaded without a module loader, and the current readme suggests including a shim 'define' function, so I have.

"q": Doesn't seem to work under mocha, because mocha stubs out some node.js globals, including "process", and "q" assumes process.nextTick is available when process is defined, which it isn't in the browser. To fix this I unset the "process" global. I think Q and mocha should sort this incompatibility out, but I'm not sure where the real fix belongs.