pixsy/node_modules/less/test/modify-vars.js

20 lines
547 B
JavaScript
Raw Normal View History

2017-12-22 17:22:08 +00:00
var less = require('../lib/less'),
fs = require('fs');
var input = fs.readFileSync("./test/less/modifyVars/extended.less", 'utf8');
var expectedCss = fs.readFileSync('./test/css/modifyVars/extended.css', 'utf8');
var options = {
modifyVars: JSON.parse(fs.readFileSync("./test/less/modifyVars/extended.json", 'utf8'))
};
less.render(input, options, function (err, result) {
if (err) {
console.log(err);
}
if (result.css === expectedCss) {
console.log("PASS");
} else {
console.log("FAIL");
}
});