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
I'm trying to get chai-as-promised working with chai-bignumber, and run into the same issue described in #70: if I call chai.use(require('chai-as-promised')) on both files, the test suite breaks, but everything runs fine if its only called on one of them. Note that I am calling use with chai-as-promised after chai-bignumber.
I understand chai-as-promised modifies previously loaded plugins to make them work with promises, and should only be loaded once, but what would be the proper way of loading all plugins so that this kind of interaction between testfiles doesn't happen?
Thanks
The text was updated successfully, but these errors were encountered:
This is described in the setup instructions and demonstrated in the code: Use a separate file for setting up chai and require it. Or does that not solve the problem? It works for me.
I'm trying to get
chai-as-promised
working withchai-bignumber
, and run into the same issue described in #70: if I callchai.use(require('chai-as-promised'))
on both files, the test suite breaks, but everything runs fine if its only called on one of them. Note that I am callinguse
withchai-as-promised
afterchai-bignumber
.I understand
chai-as-promised
modifies previously loaded plugins to make them work with promises, and should only be loaded once, but what would be the proper way of loading all plugins so that this kind of interaction between testfiles doesn't happen?Thanks
The text was updated successfully, but these errors were encountered: