-
Notifications
You must be signed in to change notification settings - Fork 4
Input box > Theme service optionally provided #203
Conversation
Codecov Report
@@ Coverage Diff @@
## master #203 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 29 29
Lines 865 865
Branches 164 164
=========================================
Hits 865 865
Continue to review full report at Codecov.
|
@@ -144,26 +162,24 @@ describe('Input box component', () => { | |||
}); | |||
}); | |||
|
|||
it('should render the label and input elements in the expected locations', () => { | |||
it('should handle SkyThemeService not provided', () => { | |||
TestBed.overrideProvider(SkyThemeService, { |
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 is going to ensure that the component handles an undefined SkyThemeService
, but it doesn't test the case where Angular has no provider for SkyThemeService
. I think I'd maybe flip these two tests where the TestBed
doesn't have SkyThemeService
provided at all, but the test where we ensure providing it has the desired effect uses overrideComponent
to inject SkyThemeService
.
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 had to wrap the default and modern tests in their own describe
blocks and create separate TestBed
s to get it to work. I also put the duplicate testing module configuration in an InputBoxFixturesModule
.
Related: blackbaud/skyux-docs-tools#137