You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as in [#339] there are two plugins which provide asynchronous change assertions - obviously important for Javascript.
I think it'd be good to integrate one. chai-change is callback based and supports assert and expect. chai-change is promise based and I could only see expect support in the docs.
The text was updated successfully, but these errors were encountered:
I think the essence of what you're saying is right, but maybe not the full idea...
I think Chai should work more towards supporting primitives, and popular patterns against these - and by this I mean, I would like to see Chai support Promises as a native part of the language, and the callback pattern as a popular primitive pattern. Personally I use chai-as-promised pretty much all of the time, and have extended a hand to @domenic to fold Chai-As-Promised into the chai org (chaijs/chai-as-promised#105 (comment)), with the potential eventuality of supporting it wholesale in Chai.
I have yet to see a really great way to handle callbacks in a similar way, but I'd definitely be excited to see PRs about that.
So ultimately, if Chai supported both Promises and callbacks, the logical extension of this would be to use the same mechanisms to provide useful assertions such as .change.
I would personally rather play the long game on this - while letting plugins like your wonderful chai-change to prop us up in the interim. Make sense?
as in [#339] there are two plugins which provide asynchronous change assertions - obviously important for Javascript.
I think it'd be good to integrate one. chai-change is callback based and supports
assert
andexpect
. chai-change is promise based and I could only seeexpect
support in the docs.The text was updated successfully, but these errors were encountered: