You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the chai-enzyme functions do not have it. I consider adding messages at the end of the assert much more readable than in the expect() function, so most of my tests use that form. With chai-enzyme I have to mix two styles now since I cannot supply a msg to something like to.contain.text().
The text was updated successfully, but these errors were encountered:
Going to slide in here with some questions unrelated to the issue here;
I consider adding messages at the end of the assert much more readable than in the expect() function
How do you consider adding custom messages more readable? What do you provide to the message parameter that the default messaging doesn't give you? (Asking because we'd like to improve messaging in chai, but would like feedback from users).
@jrnail23 thanks for that, and that is indeed a fine use case. FWIW we wont be removing the message feature - and we very much encourage people to use it for use cases like the above, I was questioning because I want to ensure that without the message, Chai gives users the best clue as to what is going wrong (even if that doesnt tell them why); and so if there is anything we can do to improve the default messaging, we would like to.
Regular function assertions in Chai have an optional
msg
argument, for example:http://chaijs.com/api/bdd/#method_include
But the
chai-enzyme
functions do not have it. I consider adding messages at the end of the assert much more readable than in theexpect()
function, so most of my tests use that form. Withchai-enzyme
I have to mix two styles now since I cannot supply amsg
to something liketo.contain.text()
.The text was updated successfully, but these errors were encountered: