-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
test: add test for runtime-dom/modules/class #75
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
Conversation
]) | ||
}) | ||
|
||
test('class merge between parent and child', () => { |
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 one is failing because the new attr fallthrough behavior in v3: vuejs/rfcs#26
There is no longer automatic class merging and the child now needs to explicitly merge parent props.
expect(root.children[0].className).toBe('c d a b') | ||
|
||
render(h(parent), root) | ||
expect(root.children[0].className).toBe('c d a b') |
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.
The only difference between the 2 cases is that child2
has an empty props
declaration, therefore it successfully triggered class merging while the other one didn't.
I didn't see anything about this behavior in the inheritAttrs
RFS.
Seems a bug in the current implementation?
@yyx990803
0997235
to
a4148c8
Compare
No description provided.