BaseCase / testdouble-chai

Chai assertions for testdouble.js
MIT License
18 stars 4 forks source link

Does not work with testdouble.js v3.0 #11

Closed BaseCase closed 7 years ago

BaseCase commented 7 years ago

Need to update to work with v3

BaseCase commented 7 years ago

Wait a minute, maybe it actually does work...all my specs are failing with testdouble 2.1.2 as well, and it looks like it's just a simple string match error.

AssertionError: expected [Function: bound ] to throw error including 'AssertionError: expected [test double for "dubs"] not to have been called with [ \'bye\' ], but it was.' but got 'expected [test double for "dubs"] not to have been called with [ \'bye\' ], but it was.'

So the expectation is looking for the word "AssertionError" in the string itself but it's not there. I imagine this is actually a change in another library (or maybe it's the Node version?).

BaseCase commented 7 years ago

OK, yeah, confirmed that it works fine with testdouble 3.0 if I just update the string in the expectation to not include the word "AssertionError". I'll open a new issue to just change that to a "contains" match instead of an exact string match.