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
Allow .true() assertion to use an optional message #272
Comments
At the moment no properties ( Would need |
@keithamus I've been thinking about how this would be implemented while still supporting throw on property access when there may or may not be a function call at the end of the chain. I can't think of a way to look ahead in the chain.
|
Yeah, I'm inclined to agree. The only way I can think of is to have a runtime flag which disables the assertion in the getter and pushes it into the function. |
Closing this as we had to revert #297. Unfortunately this doesn't look possible in the near to distant future for Chai. |
Expected:
expect(false).to.be.true("message")
should display "message".Actual: It displays "AssertionError: expected false to be true".
Providing useful error messages is supported for other assertions (.a, .equal, .above etc), can this not also be supported for the core .true and .false assertions?
The text was updated successfully, but these errors were encountered: