-
Notifications
You must be signed in to change notification settings - Fork 106
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
Package for use in a browser #15
Comments
Zuul isn't really what I had in mind, it just runs them in phantomjs, which pretty much just proves you weren't relying on |
Zuul runs them on a web server in your web browser after browserifying them, building a mocha.html with the appropriate If you want something specific to your CI server, you should probably work on making that possible without any extra code on my part. |
Sorry, I didn't mean to imply I wanted something specific to my CI server, I just meant to suggest something generic that could be easily run directly in a web-browser, so that it would easily adapt to different running environments. I'm also happy to help do some of the work on this and submit a P.R. I just wanted to make sure I wasn't about to re-invent the wheel first. I saw phantomjs in the list of dependencies and assumed it was just starting a single headless browser, which wouldn't support cross platform testing. |
If run with no https://github.com/NobleJS/setImmediate/blob/master/package.json#L23 |
I was able to get things working simply by browserifying. I had to use the browser versions of assert.js and mocha.js (mocha uses expressions in require which makes it non-browserifyable). Our test harness is pretty simple. We build
|
Thanks @wycats that's just the sort of thing I had in mind |
I gave this a quick shot with Zuul, but the problem is the adapter file needs to be supplied somehow, so it's not trivial (but probably still easy). |
I have a fork of this repo that runs in the browser. Of course the changes I made prevent it from running in node. |
…ironment" This reverts commit 67178f3. See #15. The change introduced didn't actually work around the PhantomJS-sucks problem, and I'm unwilling to go further into the territory of accomodating-broken-browsers. So let's just revert it back to the simpler version. Full discussion over in that issue.
Any news on the issue? We're planning to switch jQuery Deferred's |
:O |
Thanks to the heroic work of @calvinmetcalf in #66, this should now be possible using browserify + Mocha. Let me know how well it works for you, @mzgol. (Also interested in hearing from @stefanpenner since RSVP.js has been using a hacked setup for a while.) If we can help with e.g. documentation, a demo project, or similar happy to do so. Closing for now but will reopen if anything seems deficient. |
Would it be possible to package these tests to be used in a browser? It would be great to be able to check that a library meets the spec if every browser?
The text was updated successfully, but these errors were encountered: