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
Freeze the top-level expect #517
Conversation
As discussed on #476 [semver-major]
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.
Big 👍 from me - I think this removes a sizeable footgun for those using the library the first time.
I do wonder if we want to add a task to revise the sections talking about adding assertions and using plugins to make this new reality clear.
topLevelExpect.addAssertion('<any> to foo', function() {}); | ||
}, | ||
'to throw', | ||
'Cannot add an assertion to a frozen instance, please run .clone() first' |
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.
I think this is clear!
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.
👍
Did you see any performance penalty?
I can't imagine there would be? The only change is that |
As discussed on #476