domenic/sinon-chai — Issue #3: browser compatibility
Author: michaelsbradleyjr
Created: 2012-03-01 05:00:09+00:00
State: open

I was hoping to be able to use your sinon-chai plugin both in browser environments and with NodeJS. So I forked it and borrowed a technique from the underscore.js library to make it cross-compatible with minimal adjustments:

[https://github.com/michaelsbradleyjr/sinon-chai/blob/browser-compatible/lib/sinon-chai.js](https://github.com/michaelsbradleyjr/sinon-chai/blob/browser-compatible/lib/sinon-chai.js)

All the tests still pass following the modification, and it seems to work fine in my browser environments.

I can issue a pull request, if you wish, but I wasn't sure that is the best way to start a conversation on GitHub, so I filed this issue first. Let me know what you think, and thanks for the great plugin.