Last change
on this file since 84d0fbb was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
703 bytes
|
Line | |
---|
1 | var less;
|
---|
2 |
|
---|
3 | // Dist fallback for NPM-installed Less (for plugins that do testing)
|
---|
4 | try {
|
---|
5 | less = require('../tmp/less.cjs.js');
|
---|
6 | }
|
---|
7 | catch (e) {
|
---|
8 | less = require('../dist/less.cjs.js');
|
---|
9 | }
|
---|
10 |
|
---|
11 | var fs = require('fs');
|
---|
12 |
|
---|
13 | var input = fs.readFileSync('./test/less/modifyVars/extended.less', 'utf8');
|
---|
14 | var expectedCss = fs.readFileSync('./test/css/modifyVars/extended.css', 'utf8');
|
---|
15 | var options = {
|
---|
16 | modifyVars: JSON.parse(fs.readFileSync('./test/less/modifyVars/extended.json', 'utf8'))
|
---|
17 | };
|
---|
18 |
|
---|
19 | less.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.