-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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(select): add tests for select label package #2289
Conversation
}); | ||
|
||
|
||
test('adapter#removeClass adds a class to the root element', () => { |
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.
s/adds/removes/
const {component} = setupTest(); | ||
component.foundation_.styleFloat = td.function(); | ||
component.float(); | ||
td.verify(component.foundation_.styleFloat(td.matchers.anything())); |
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.
Replace anything()
with isA(String)
?
const {component} = setupTest(); | ||
component.foundation_.styleFloat = td.func(); | ||
component.float(); | ||
td.verify(component.foundation_.styleFloat(td.matchers.anything())); |
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.
My previous comment got hidden due to the next commit for some reason, but still applies: anything
-> isA(String)
Codecov Report
@@ Coverage Diff @@
## master #2289 +/- ##
=========================================
+ Coverage 98.8% 99.21% +0.4%
=========================================
Files 96 96
Lines 3943 3943
Branches 508 508
=========================================
+ Hits 3896 3912 +16
+ Misses 47 31 -16
Continue to review full report at Codecov.
|
suite('MDCSelectLabelFoundation'); | ||
|
||
test('exports cssClasses', () => { | ||
assert.isTrue('cssClasses' in MDCSelectLabelFoundation); |
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.
Add another statement here, assert.deepEqual(MDCSelectLabelFoundation.cssClasses, cssClasses);
const {component} = setupTest(); | ||
component.foundation_.styleFloat = td.func(); | ||
component.float('value'); | ||
td.verify(component.foundation_.styleFloat(td.matchers.isA(String))); |
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.
Oops, I'm silly and didn't realize you're defining the actual string right above this. Assign 'value'
to a const
and reference it in both float()
and styleFloat()
. (It's expected to pass it through, right?)
…components/material-components-web into fix/select/add-tests-for-label
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 typo, otherwise LGTM
}); | ||
|
||
|
||
test('adapter#removeClass removes a class to the root element', () => { |
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.
s/to/from/
Tests for #2244. This should increase test coverage.