Skip to content
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

test: add test for runtime-dom/modules/class #75

Merged
merged 5 commits into from Dec 9, 2019
Merged

Conversation

sodatea
Copy link
Member

@sodatea sodatea commented Sep 30, 2019

No description provided.

])
})

test('class merge between parent and child', () => {
Copy link
Member

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')
Copy link
Member Author

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

@yyx990803 yyx990803 merged commit d1527fb into master Dec 9, 2019
@yyx990803 yyx990803 deleted the test-dom-class branch July 18, 2020 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants