source: trip-planner-front/node_modules/less/test/modify-vars.js@ fa375fe

Last change on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 703 bytes
Line 
1var less;
2
3// Dist fallback for NPM-installed Less (for plugins that do testing)
4try {
5 less = require('../tmp/less.cjs.js');
6}
7catch (e) {
8 less = require('../dist/less.cjs.js');
9}
10
11var fs = require('fs');
12
13var input = fs.readFileSync('./test/less/modifyVars/extended.less', 'utf8');
14var expectedCss = fs.readFileSync('./test/css/modifyVars/extended.css', 'utf8');
15var options = {
16 modifyVars: JSON.parse(fs.readFileSync('./test/less/modifyVars/extended.json', 'utf8'))
17};
18
19less.render(input, options, function (err, result) {
20 if (err) {
21 console.log(err);
22 }
23 if (result.css === expectedCss) {
24 console.log('PASS');
25 } else {
26 console.log('FAIL');
27 }
28});
Note: See TracBrowser for help on using the repository browser.