@@ -145,20 +145,44 @@ describe('loader', function() {
145
145
146
146
describe ( 'configuration via query' , function ( ) {
147
147
148
- it ( 'should configure CommonJS output' ,
149
- testLoader ( 'test/fixtures/good.html' , function ( err , code , map ) {
150
- expect ( err ) . not . to . exist ;
151
- expect ( code ) . to . contain ( 'module.exports = SvelteComponent;' ) ;
152
- } , { format : 'cjs' } )
153
- ) ;
148
+ describe ( 'output + name' , function ( ) {
154
149
150
+ it ( 'should configure CommonJS' ,
151
+ testLoader ( 'test/fixtures/good.html' , function ( err , code , map ) {
152
+ expect ( err ) . not . to . exist ;
153
+ expect ( code ) . to . contain ( 'module.exports = SvelteComponent;' ) ;
154
+ } , { format : 'cjs' } )
155
+ ) ;
155
156
156
- it ( 'should configure named UMD output' ,
157
- testLoader ( 'test/fixtures/good.html' , function ( err , code , map ) {
158
- expect ( err ) . not . to . exist ;
159
- expect ( code ) . to . contain ( '(global.FooComponent = factory());' ) ;
160
- } , { format : 'umd' , name : 'FooComponent' } )
161
- ) ;
157
+
158
+ it ( 'should configure UMD + name' ,
159
+ testLoader ( 'test/fixtures/good.html' , function ( err , code , map ) {
160
+ expect ( err ) . not . to . exist ;
161
+ expect ( code ) . to . contain ( '(global.FooComponent = factory());' ) ;
162
+ } , { format : 'umd' , name : 'FooComponent' } )
163
+ ) ;
164
+
165
+ } ) ;
166
+
167
+
168
+ describe ( 'css' , function ( ) {
169
+
170
+ it ( 'should configure css (default)' ,
171
+ testLoader ( 'test/fixtures/css.html' , function ( err , code , map ) {
172
+ expect ( err ) . not . to . exist ;
173
+ expect ( code ) . to . contain ( 'if ( !addedCss ) addCss();' ) ;
174
+ } )
175
+ ) ;
176
+
177
+
178
+ it ( 'should configure no css' ,
179
+ testLoader ( 'test/fixtures/css.html' , function ( err , code , map ) {
180
+ expect ( err ) . not . to . exist ;
181
+ expect ( code ) . not . to . contain ( 'if ( !addedCss ) addCss();' ) ;
182
+ } , { css : false } )
183
+ ) ;
184
+
185
+ } ) ;
162
186
163
187
} ) ;
164
188
0 commit comments