-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[core] Improve test coverage #16453
[core] Improve test coverage #16453
Conversation
No bundle size changes comparing 3bbf941...114bc4f |
165ee08
to
0ad86f6
Compare
assert.strictEqual(handleEmpty.callCount, 1); | ||
assert.strictEqual(muiFormControl.onEmpty.callCount, 2); | ||
fireEvent.change(container.querySelector('input'), { target: { value: '' } }); | ||
expect(handleEmpty.callCount).to.equal(2); |
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.
Was 1 is now 2 because of implicit act. Those values don't really make sense to me right now but I will follow-up on this because the current behavior probably causes #16458.
<ListItem> | ||
<ListItemText primary="primary" /> | ||
<ListItemSecondaryAction /> | ||
</ListItem>, | ||
); | ||
const listItem = findOutermostIntrinsic(wrapper); | ||
assert.strictEqual(listItem.hasClass(classes.container), true); | ||
assert.strictEqual(wrapper.find('li > div').exists(), true); |
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 didn't do what it was intended to do since it also matched <li><span /><div /></li>
which is important for the next test.
0ad86f6
to
114bc4f
Compare
expect(root).to.have.class(classes.sizeSmall); | ||
|
||
root = render(<IconButton size="medium">book</IconButton>).container.firstChild; | ||
expect(root).not.to.have.class(classes.sizeSmall); |
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.
I know you copied the previous tests but, should we test that the medium class has been applied?
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.
There is no medium class. It's one of the issues I have with moving default styles to root instead their actual variant.
Converts all tests for components applying density. I'm touching the test anyway for #16410 so that's always a good time for refactoring.