-
Notifications
You must be signed in to change notification settings - Fork 108
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
Support jQuery >= 3.0.0 #122
Conversation
This is used in configurable-asserter-args.coffee. It should be set to the library's equivalent of Not really sure about the failures otherwise. |
This now passes all the tests with jQuery 3.0.0-beta1. I had to add one more global as jQuery Deferreds have a promise method, not a static property. |
@@ -25,5 +25,8 @@ exports.adapter = """ | |||
return deferred.promise; | |||
}; | |||
global.defer = when.defer; | |||
global.getPromise = function (deferred) { | |||
return deferred.promise; | |||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't test these changes as they're currently broken even on master.
Please don't add a new global. Instead, have |
@domenic Done. |
Thanks! |
Thanks for landing! It would be sweet if you could update the header at your popular post at https://blog.domenic.me/youre-missing-the-point-of-promises/; specifically the part "they will forever remain broken" is no longer true. |
I need some help here. I tried to mimick
when
config; when I runnpm run test-browser-jquery
, I get 3 failures (much better than >100 of them with jQuery 2.1.4 but still):First of them is in lib/chai-as-promised.js#L308 where
args
is set to"test it"
and should be an array-like.What's the expected definition of
global.waitAll
? Test results didn't change when I removed it; is it needed?I wasn't sure what version you want to include so I used the link to the latest
master
one as I believe that's what you have forwhen
. I can change it to3.0.0-alpha1
if you prefer it to be more deterministic.There are two bugs related to jQuery Deferreds that I linked in the adapter file (they should both be fixed before the final 3.0.0) but they're both with
jQuery.when
, notthenable.then
; the latter should work.