@@ -71,6 +71,12 @@ describe('ThemedComponent', () => {
7171 expect ( ( component as any ) . compRef . instance . testInput ) . toEqual ( 'changed' ) ;
7272 } ) ;
7373 } ) ) ;
74+
75+ it ( `should set usedTheme to the name of the matched theme` , waitForAsync ( ( ) => {
76+ fixture . whenStable ( ) . then ( ( ) => {
77+ expect ( component . usedTheme ) . toEqual ( 'custom' ) ;
78+ } ) ;
79+ } ) ) ;
7480 } ) ;
7581
7682 describe ( 'when the current theme doesn\'t match a themed component' , ( ) => {
@@ -92,6 +98,12 @@ describe('ThemedComponent', () => {
9298 expect ( ( component as any ) . compRef . instance . testInput ) . toEqual ( 'changed' ) ;
9399 } ) ;
94100 } ) ) ;
101+
102+ it ( `should set usedTheme to the name of the base theme` , waitForAsync ( ( ) => {
103+ fixture . whenStable ( ) . then ( ( ) => {
104+ expect ( component . usedTheme ) . toEqual ( 'base' ) ;
105+ } ) ;
106+ } ) ) ;
95107 } ) ;
96108
97109 describe ( 'and it extends another theme' , ( ) => {
@@ -117,6 +129,12 @@ describe('ThemedComponent', () => {
117129 expect ( ( component as any ) . compRef . instance . testInput ) . toEqual ( 'changed' ) ;
118130 } ) ;
119131 } ) ) ;
132+
133+ it ( `should set usedTheme to the name of the base theme` , waitForAsync ( ( ) => {
134+ fixture . whenStable ( ) . then ( ( ) => {
135+ expect ( component . usedTheme ) . toEqual ( 'base' ) ;
136+ } ) ;
137+ } ) ) ;
120138 } ) ;
121139
122140 describe ( 'that does match it' , ( ) => {
@@ -141,6 +159,12 @@ describe('ThemedComponent', () => {
141159 expect ( ( component as any ) . compRef . instance . testInput ) . toEqual ( 'changed' ) ;
142160 } ) ;
143161 } ) ) ;
162+
163+ it ( `should set usedTheme to the name of the matched theme` , waitForAsync ( ( ) => {
164+ fixture . whenStable ( ) . then ( ( ) => {
165+ expect ( component . usedTheme ) . toEqual ( 'custom' ) ;
166+ } ) ;
167+ } ) ) ;
144168 } ) ;
145169
146170 describe ( 'that extends another theme that doesn\'t match it either' , ( ) => {
@@ -167,6 +191,12 @@ describe('ThemedComponent', () => {
167191 expect ( ( component as any ) . compRef . instance . testInput ) . toEqual ( 'changed' ) ;
168192 } ) ;
169193 } ) ) ;
194+
195+ it ( `should set usedTheme to the name of the base theme` , waitForAsync ( ( ) => {
196+ fixture . whenStable ( ) . then ( ( ) => {
197+ expect ( component . usedTheme ) . toEqual ( 'base' ) ;
198+ } ) ;
199+ } ) ) ;
170200 } ) ;
171201
172202 describe ( 'that extends another theme that does match it' , ( ) => {
@@ -193,6 +223,12 @@ describe('ThemedComponent', () => {
193223 expect ( ( component as any ) . compRef . instance . testInput ) . toEqual ( 'changed' ) ;
194224 } ) ;
195225 } ) ) ;
226+
227+ it ( `should set usedTheme to the name of the matched theme` , waitForAsync ( ( ) => {
228+ fixture . whenStable ( ) . then ( ( ) => {
229+ expect ( component . usedTheme ) . toEqual ( 'custom' ) ;
230+ } ) ;
231+ } ) ) ;
196232 } ) ;
197233 } ) ;
198234 } ) ;
0 commit comments