Add the parent expect to the prototype chain of a child expect#785
Add the parent expect to the prototype chain of a child expect#785papandreou merged 3 commits intomasterfrom
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
sunesimonsen
left a comment
There was a problem hiding this comment.
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.