File tree 1 file changed +18
-2
lines changed
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -32,13 +32,16 @@ describe('loader', () => {
32
32
33
33
const callbackSpy = spy ( cb ) ;
34
34
35
+ const nameParts = fileName . split ( / [ / \\ ] / g) ;
36
+
35
37
loader . call (
36
38
{
37
39
cacheable : cacheableSpy ,
38
40
async : ( ) => callbackSpy ,
39
- resourcePath : fileName ,
40
41
version,
41
- query
42
+ query,
43
+ resourcePath : fileName ,
44
+ resource : nameParts [ nameParts . length - 1 ] ,
42
45
} ,
43
46
fileContents ,
44
47
null
@@ -210,6 +213,19 @@ describe('loader', () => {
210
213
) ;
211
214
} ) ;
212
215
216
+ it (
217
+ 'should configure emitCss=true' ,
218
+ testLoader (
219
+ 'test/fixtures/css.html' ,
220
+ function ( err , code , map ) {
221
+ expect ( err ) . not . to . exist ;
222
+
223
+ expect ( code ) . to . match ( / ! = ! s v e l t e - l o a d e r \? c s s P a t h = / ) ;
224
+ } ,
225
+ { emitCss : true }
226
+ )
227
+ ) ;
228
+
213
229
describe ( 'preprocess' , ( ) => {
214
230
it ( 'should preprocess successfully' , done => {
215
231
testLoader (
You can’t perform that action at this time.
0 commit comments