gulp-minify-css
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -22,3 +22,3 @@ var path = require('path'), | ||
// cache hit | ||
done(cached.minified); | ||
done(null, cached.minified); | ||
@@ -25,0 +25,0 @@ } else { |
{ | ||
"name": "gulp-minify-css", | ||
"description": "Minify css with clean-css.", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"repository": "https://github.com/jonathanepollack/gulp-minify-css.git", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/jonathanepollack/gulp-minify-css", |
@@ -32,2 +32,7 @@ /* global require, describe, __dirname, it, Buffer, beforeEach, setTimeout */ | ||
}; | ||
var p = function(cb) { | ||
gulp.src(filename) | ||
.pipe(minifyCSS(options)) | ||
.pipe(es.map(cb)); | ||
}; | ||
@@ -57,3 +62,2 @@ beforeEach(function() { | ||
.pipe(es.map(function(file){ | ||
setTimeout(function() { | ||
expect(cacheStub.size()).to.be.equal(1); | ||
@@ -66,5 +70,16 @@ expect(cacheStub.get(filename)).to.deep.equal({ | ||
done(); | ||
}, 100); | ||
})); | ||
}); | ||
it('should return the cached content if the cache is used', function(done) { | ||
p(function(file) { | ||
expect(file.contents.toString()).to.be.equal(compiled.styles); | ||
cacheStub.get(filename).minified.styles = 'cached data'; | ||
p(function(cachedFile) { | ||
expect(cachedFile.contents.toString()).to.be.equal('cached data'); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
@@ -102,2 +117,14 @@ | ||
}); | ||
it('should return the cached content if the cache is used', function(done) { | ||
p(function(file) { | ||
expect(file.contents.toString()).to.be.equal(compiled.styles); | ||
cacheStub.get(filename).minified.styles = 'cached data'; | ||
p(function(cachedFile) { | ||
expect(cachedFile.contents.toString()).to.be.equal('cached data'); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
@@ -104,0 +131,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21493
465