-
Notifications
You must be signed in to change notification settings - Fork 244
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
fix(find): allow finding root without name #836
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.
One comment. Also just to confirm my understanding here, the way this works is we create a stub (which is not really a stub, just maps to itself) to be able to search via constructor?
@@ -48,7 +48,7 @@ describe('getComponent', () => { | |||
}) | |||
|
|||
it('should throw if not found with a component selector that has no name', () => { | |||
const wrapper = mount(compA) |
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.
This test is not relevant anymore, is it? It was testing for the missing behavior which you implemented.
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 is still relevant - we still should throw
getComponent if we were unable to find component without name. It just updated to reflect changes in this PR - previously we were searching for compA inside compA - and it throws (not the case anymore), now we search for compA inside compB and it also throws (which is what this test about - about throwing, not about matching root)
Sometimes (when the component is created via options API or is a functional component) - instead of mounting the component we're providing we're making its "clone" (this is required to modify mixins field for |
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.
Great - just need to resolve the conflict.
One all these are merged up, let's do a release.
@lmiller1990 Sure, I will arrange this today |
571b00d
to
efc9ed7
Compare
efc9ed7
to
3849591
Compare
Pretty self-describing, I hope :)