-
Notifications
You must be signed in to change notification settings - Fork 28
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
update testing framework #75
Conversation
Switch fully to zuul Add saucelabs config Use node LTS and npm 2 for building
This is very cool.
|
I think phantom is fine for local tests. I don't think it matters as much as the CI tests which are being run against real browsers. Yeah timing out was a huge travis-ci problem yesterday. Hopefully it's better today. Quite bad timing that travis was having all those problems on the day I decided to tackle this. This code is, as always, MIT licensed ;) |
Looks like we're relying on |
Gonna get the other tests working first then come back and refactor the integration tests to run something like sinonjs. http://sinonjs.org/docs/#server |
I made these tests send real requests so that they'd cover XDomain issues in older browsers too. As long as you stub the XMLHttpRequest, it should be fine. Pro tip: Not a lot of free time recently, but I could help if you're not in a rush. |
Yeah as far as I can tell that's exactly what sinonjs does (stub the xmlhttprequest). Gonna try to get it working this afternoon, thanks for the heads up on xhr. |
I've been using sinon quite a while and that's what I've been implying here :) It's a bit tricky, because at first everyone tends to try using the stub handle while it's the global XMLHttpRequest that is replaced. This should work:
|
Wow you're a saint, thank you so much for solving the problem already. I'm doing this one last, will start on it after I get the tests in ampersand-view working. ^5 |
What a nightmare. Turns out zuul uses xhr and also makes xmlhttprequests during the test suite. Spent all day tracking that little quirk down. These tests will not work anymore under node, as xhr returns the request library under those circumstances. |
Ouch. Looks like you had fun debugging. I'm on my phone and I only had a moment to look at the code, but I don't see why not just go with jquery.noconflict algorithm here.
|
I was thinking about it in the background today and I have an idea for a tool that'd solve this without regressing on node tests. |
The noconflict approach wouldn't make any difference cause zuul is requiring xhr too, haha. |
I think this one's ready to go @AmpersandJS/core-team it still maintains IE9+ support. |
+1 |
@naugtur would you be cool w/ merging this till you can make your ideas into another PR? |
Sure. It doesn't affect functionality and tests on browsers are a priority. Also, thanks for asking. :) |
Switch fully to zuul
Add saucelabs config
Use node LTS and npm 2 for building
See discussion that led to this here: AmpersandJS/ampersand-filtered-subcollection#26