postcss-critical-split
Version:
A PostCSS plugin that takes existing CSS files and splits out the annotated critical styles into a seperate file.
14 lines (10 loc) • 316 B
JavaScript
var postcss = require('postcss');
module.exports = function(criticalSplit, input, output, opts) {
spyOn(console, 'log').and.callFake(function(message){
// do nothing
});
return postcss([criticalSplit(opts)]).process(input)
.then( function(result) {
expect(console.log).toHaveBeenCalledTimes(1);
});
}