File tree 1 file changed +19
-2
lines changed
1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,31 @@ var cssLoader = require("../index.js");
4
4
5
5
function test ( name , input , result ) {
6
6
it ( name , function ( ) {
7
- var output = cssLoader ( input ) ;
7
+ var output ;
8
+ cssLoader . call ( {
9
+ loaders : [ { request : "loader" } ] ,
10
+ loaderIndex : 0 ,
11
+ resource : "test.css" ,
12
+ callback : function ( err , result ) {
13
+ output = result ;
14
+ }
15
+ } , input ) ;
8
16
output . should . be . eql ( "module.exports =\n\t" + result . join ( " +\n\t" ) + ";" ) ;
9
17
} ) ;
10
18
}
11
19
12
20
function testMinimize ( name , input , result ) {
13
21
it ( name , function ( ) {
14
- var output = cssLoader . call ( { minimize : true } , input ) ;
22
+ var output ;
23
+ cssLoader . call ( {
24
+ loaders : [ { request : "loader" } ] ,
25
+ loaderIndex : 0 ,
26
+ resource : "test.css" ,
27
+ minimize : true ,
28
+ callback : function ( err , result ) {
29
+ output = result ;
30
+ }
31
+ } , input ) ;
15
32
output . should . be . eql ( "module.exports =\n\t" + result . join ( " +\n\t" ) + ";" ) ;
16
33
} ) ;
17
34
}
You can’t perform that action at this time.
0 commit comments