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
Replace chai.should with chai.expect. #1687
Comments
Can you explain what is an ugly hack about |
'Hack' isn't really the best name, but I dislike having to wrap the thing in parenthesis simply due to how That said, I much prefer |
tagging this - I can work on this next |
I can work on this within a few days. Just had one doubt- do we need to import |
Awesome @RCYP! @ckshei had started working on this (#1723), but closed the issue due to a lack of time. We could merge intermediate work to a development branch, since this may end up being somewhat big. Regarding bignumber, the plugin is automatically installed by |
Yes, let's move forward with that. |
Throughout the codebase we're using
chai.should
, which patches all objects so that they have theshould
property (this is done here).It'd be great to get rid of that, and switch to
expect
, which is not only simpler due to it just requiring to import a function, but also has arguably clearer semantics (and prevents ugly hacks like(await promise()).should.bla.bla.bla
). This conversion should be rather straightforward, with mostobj.should.equal
being replaced forexpect(obj).to.equal
, though we'd also have to addconst { expect } = require('chai')
at the top of the relevant files.The text was updated successfully, but these errors were encountered: