Skip to content

Commit fd2a7f6

Browse files
committed
fix tests
1 parent 312b9ce commit fd2a7f6

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

test/urlTest.js

+19-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,31 @@ var cssLoader = require("../index.js");
44

55
function test(name, input, result) {
66
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);
816
output.should.be.eql("module.exports =\n\t" + result.join(" +\n\t") + ";");
917
});
1018
}
1119

1220
function testMinimize(name, input, result) {
1321
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);
1532
output.should.be.eql("module.exports =\n\t" + result.join(" +\n\t") + ";");
1633
});
1734
}

0 commit comments

Comments
 (0)