Closed cassus closed 8 years ago
Hi, @cassus! Unfortunately, I can't find any good examples, where chai.assert is extended with new functionality. As far I get from the source code of chai - assert interface works a bit different from should/expect and as for now I can't suggest something better rather that workaround you are using. In case if you use some chai plugins that allows you to extend chai.assert please let me know.
I made this workaround based on https://github.com/michelsalib/chai-shallow-deep-equal/blob/master/chai-shallow-deep-equal.js#L97 where it's part of the library.
Chai-immutable also uses similar pattern to add to the chai.assert object: https://github.com/astorije/chai-immutable/blob/master/chai-immutable.js#L482
okay, then I agree that this could be added. Will do that soon
PR #14
I'd like to use
assert.containSubset
or something similar using the assert chai interface and not the should or expect.I found this workaround.