Closed herintsoa-hasina closed 3 years ago
Hey! Sorry for the belated reply. That seemed like a reasonable suggestion. Thank you! I've merged it in and will release a new version shortly.
Btw, are you the same person as https://github.com/mrHerintsoaHasina?
Yes I am
Le lun. 2 nov. 2020 à 13:37, Andri Möll notifications@github.com a écrit :
Btw, are you the same person as https://github.com/mrHerintsoaHasina?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/moll/js-must/pull/73#issuecomment-720446177, or unsubscribe https://github.com/notifications/unsubscribe-auth/AISV5AYPHFXCCNWG7SCFAFLSN2RZJANCNFSM4EUBFVLA .
Hello guys,
I like very much the js-must project as a test tool in my own project. When searching in the source code, I was interested to make the length assert error message more expressive. I modified the Must.prototype.length implementation to improve the ouput of the error message assertion. In fact, it will be more interesting to show the difference between the expected and the actual length when the assertion fails.
For example,
[2,'a'].must.have.length(3)
should return this outputOr
"hello".must.have.length(3)
with the output