-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add the parent expect to the prototype chain of a child expect #785
Conversation
@sunesimonsen @alexjeffburke, any objections to landing this in a minor given that it doesn't break anything, including the 🐦 build? |
@papandreou would you be able to drop a refresher on what the effect of this is? I vaguely remember the change but have no memory of what it achieves lol. |
The effect is that the This seems like a sane direction to go in no matter what, but IIRC the specific occasion was that it would be easier to make the expect.addAssertion('<object> to have foo property that bars', (expect, subject, value) => {
expect(object, 'to satisfy', {
foo: expect.toBar()
});
}); ... where the alternative would be to attach every expanded camelCase assertion to child expects also, which would be expensive. |
@alexjeffburke, did that make sense? :) |
fd6231b
to
23105f0
Compare
23105f0
to
16e4b28
Compare
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.
Other than my comment is looks fine :-)
Extracted from #784 because it seems like a reasonable idea no matter what.
Strictly speaking this is semver-major, but I very much doubt that anyone is relying on it.