miaow-css-autoprefixer
Version:
Miaow的CSS自动前缀补全工具,只是对autoprefixer进行简单封装
35 lines (28 loc) • 815 B
JavaScript
var assert = require('assert');
var find = require('lodash.find');
var fs = require('fs');
var miaow = require('miaow');
var path = require('path');
var parse = require('../index');
describe('miaow-css-autoprefixer', function() {
this.timeout(10e3);
var log;
before(function(done) {
miaow({
context: path.resolve(__dirname, './fixtures')
}, function(err) {
if (err) {
console.error(err.toString(), err.stack);
process.exit(1);
}
log = JSON.parse(fs.readFileSync(path.resolve(__dirname, './output/miaow.log.json')));
done();
});
});
it('接口是否存在', function() {
assert(!!parse);
});
it('自动补全', function() {
assert.equal(find(log.modules, {src: 'foo.css'}).destHash, 'b9aeabd2e7308d0c9b28a6e1958c9090');
});
});