Permalink
Browse files

fix tests

  • Loading branch information...
1 parent 312b9ce commit fd2a7f61617cd3dec9214e0ec51b7bf077f3a60d @sokra sokra committed Mar 25, 2013
Showing with 19 additions and 2 deletions.
  1. +19 −2 test/urlTest.js
View
@@ -4,14 +4,31 @@ var cssLoader = require("../index.js");
function test(name, input, result) {
it(name, function() {
- var output = cssLoader(input);
+ var output;
+ cssLoader.call({
+ loaders: [{request: "loader"}],
+ loaderIndex: 0,
+ resource: "test.css",
+ callback: function(err, result) {
+ output = result;
+ }
+ }, input);
output.should.be.eql("module.exports =\n\t" + result.join(" +\n\t") + ";");
});
}
function testMinimize(name, input, result) {
it(name, function() {
- var output = cssLoader.call({minimize: true}, input);
+ var output;
+ cssLoader.call({
+ loaders: [{request: "loader"}],
+ loaderIndex: 0,
+ resource: "test.css",
+ minimize: true,
+ callback: function(err, result) {
+ output = result;
+ }
+ }, input);
output.should.be.eql("module.exports =\n\t" + result.join(" +\n\t") + ";");
});
}

0 comments on commit fd2a7f6

Please sign in to comment.