@@ -103,22 +103,23 @@ describe('bootstrapUtils', () => {
103
103
it ( 'should work with ES classes' , ( ) => {
104
104
shouldWarn ( 'expected one of ["minimal","tweed","plaid"]' ) ;
105
105
106
- @bsStyles ( [ 'minimal' , 'tweed' , 'plaid' ] , 'plaid' )
107
106
class Component extends React . Component {
108
107
render ( ) { return < span /> ; }
109
108
}
110
109
111
- const instance = render ( < Component /> ) ;
110
+ const WrappedComponent = bsStyles ( [ 'minimal' , 'tweed' , 'plaid' ] , 'plaid' ) ( Component ) ;
111
+
112
+ const instance = render ( < WrappedComponent /> ) ;
112
113
113
114
expect ( instance . props . bsStyle ) . to . equal ( 'plaid' ) ;
114
115
115
- render ( < Component bsStyle = "not-plaid" /> ) ;
116
+ render ( < WrappedComponent bsStyle = "not-plaid" /> ) ;
116
117
} ) ;
117
118
118
119
it ( 'should work with createClass' , ( ) => {
119
- shouldWarn ( 'expected one of ["minimal","boss","plaid"]' ) ;
120
+ shouldWarn ( 'expected one of ["minimal","boss","plaid","tweed" ]' ) ;
120
121
121
- const Component = bsStyles ( [ 'minimal' , 'boss' , 'plaid' ] , 'plaid' ) (
122
+ const Component = bsStyles ( [ 'minimal' , 'boss' , 'plaid' , 'tweed' ] , 'plaid' ) (
122
123
React . createClass ( {
123
124
render ( ) { return < span /> ; }
124
125
} )
@@ -178,22 +179,23 @@ describe('bootstrapUtils', () => {
178
179
it ( 'should work with es6 classes' , ( ) => {
179
180
shouldWarn ( 'expected one of ["smallish","micro","planet"]' ) ;
180
181
181
- @bsSizes ( [ 'smallish' , 'micro' , 'planet' ] , 'smallish' )
182
182
class Component extends React . Component {
183
183
render ( ) { return < span /> ; }
184
184
}
185
185
186
- const instance = render ( < Component /> ) ;
186
+ const WrappedComponent = bsSizes ( [ 'smallish' , 'micro' , 'planet' ] , 'smallish' ) ( Component ) ;
187
+
188
+ const instance = render ( < WrappedComponent /> ) ;
187
189
188
190
expect ( instance . props . bsSize ) . to . equal ( 'smallish' ) ;
189
191
190
- render ( < Component bsSize = "not-smallish" /> ) ;
192
+ render ( < WrappedComponent bsSize = "not-smallish" /> ) ;
191
193
} ) ;
192
194
193
195
it ( 'should work with createClass' , ( ) => {
194
- shouldWarn ( 'expected one of ["smallish","micro","planet"]' ) ;
196
+ shouldWarn ( 'expected one of ["smallish","micro","planet","big" ]' ) ;
195
197
196
- const Component = bsSizes ( [ 'smallish' , 'micro' , 'planet' ] , 'smallish' ) (
198
+ const Component = bsSizes ( [ 'smallish' , 'micro' , 'planet' , 'big' ] , 'smallish' ) (
197
199
React . createClass ( {
198
200
render ( ) { return < span /> ; }
199
201
} )
0 commit comments