-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Browser support #68
Comments
Thanks for the issue @BigstickCarpet. You're quite right - it could be useful to have this work in the browser. Do you fancy trying to tackle this? If you need any help let me know. |
Sure, I can take a crack at it. Does my approach sound good to you? I'll just add Browserify to package it up into a browser-safe bundle. |
Sounds perfect 😄. |
Step 1: getting all the existing tests passing. I've submitted a PR for that: #69 |
Step 2: browser support. Done. :) |
@BigstickCarpet this one can be closed right? I'm going to close it for now, LMK if it needs re-opening 😄 |
Yep. sorry, I should have closed it months ago |
Chai and Superagent can both be run in Node or in web browsers. It would be great if your plugin worked in browsers too. This would allow people to write universal tests that can run in Node (great for CI) and in browsers (great for real-world testing). Mocha also supports both Node and web browsers, so it's dead-simple to accomplish truly universal tests.
I don't think it would even require many changes to the code, since most of your dependencies are already universal. And some dependencies (like cookie jar) wouldn't be needed when running in a browser. You could probably just bundle your existing code via Browserify or WebPack.
The text was updated successfully, but these errors were encountered: