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
Feature: assertInstanceOf #5749
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It this more useful than assert(a instanceof B)
? It's not even shorter to type:
> "assertInstanceOf(a, B)".length
22
> "assert(a instanceof B)".length
22
I appreciate the feedback, it's a fair point, and we could make it |
@RobDWaller Thanks for the patch but I'm going to close without merge. I think we shouldn't expand the asserts too much. |
Thanks @ry understand your position. I do feel some developers will get benefit from additional assertions though, so will have a look into creating a third party extension they can use if they desire. |
New test assertion to allow a developer to assert they have the correct object instance. Useful if there is a polymorphic relationship of some kind.
For example: