Skip to content
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

Issues with plugins on multiple test files #244

Open
nventuro opened this issue Apr 19, 2018 · 1 comment
Open

Issues with plugins on multiple test files #244

nventuro opened this issue Apr 19, 2018 · 1 comment

Comments

@nventuro
Copy link

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

@tjanson
Copy link

tjanson commented Sep 24, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants