Open PhilippMi opened 7 years ago
It also interferes with chai-html. I've had success putting chai.use(chaiHttp)
in a before
block, but 1. that may just work because of the order in which my tests are running, and 2. that doesn't really help you if you need to use both in the same test.
I'm not sure that this will ever be "fixed" because using any two plugins together can cause this.
Hey @PhilippMi thanks for the issue!
Thanks @stevenhair for the extra comment.
We have some plans to fix this kind of thing long term, but yeah this wont be fixed any time soon. Follow https://github.com/chaijs/chai/issues/585 which hopes to address this (and many other issues) in the chai ecosystem
I created a little test to demonstrate the issue:
When I execute this code, everything works as expected and the test passes. But when I uncomment
chai.use(chaiHttp)
, I get the following error:It seems like chai-http is interfering here with the chai-dom assertions.
I created a little repository where you can try my test code: https://github.com/PhilippMi/chai-http-dom-test