wishthis/node_modules/less/test/browser/generator/runner.config.js

186 lines
6.7 KiB
JavaScript
Raw Normal View History

2022-01-21 08:28:41 +00:00
var path = require('path');
var resolve = require('resolve')
var rootFolder = path.resolve(__dirname, '../../../');
var testFolder = path.relative(rootFolder, path.dirname(resolve.sync('@less/test-data')))
var lessFolder = path.join(testFolder, 'less');
module.exports = {
main: {
// src is used to build list of less files to compile
src: [
`${lessFolder}/_main/*.less`,
`!${lessFolder}/_main/plugin-preeval.less`, // uses ES6 syntax
// Don't test NPM import, obviously
`!${lessFolder}/_main/plugin-module.less`,
`!${lessFolder}/_main/import-module.less`,
`!${lessFolder}/_main/javascript.less`,
`!${lessFolder}/_main/urls.less`,
`!${lessFolder}/_main/empty.less`
],
options: {
2023-08-17 09:47:40 +00:00
helpers: 'test/browser/runner-main-options.js',
specs: 'test/browser/runner-main-spec.js',
outfile: 'tmp/browser/test-runner-main.html'
2022-01-21 08:28:41 +00:00
}
},
legacy: {
src: [`${lessFolder}/legacy/*.less`],
options: {
2023-08-17 09:47:40 +00:00
helpers: 'test/browser/runner-legacy-options.js',
specs: 'test/browser/runner-legacy-spec.js',
outfile: 'tmp/browser/test-runner-legacy.html'
2022-01-21 08:28:41 +00:00
}
},
strictUnits: {
src: [`${lessFolder}/strict-units/*.less`],
options: {
2023-08-17 09:47:40 +00:00
helpers: 'test/browser/runner-strict-units-options.js',
specs: 'test/browser/runner-strict-units-spec.js',
outfile: 'tmp/browser/test-runner-strict-units.html'
2022-01-21 08:28:41 +00:00
}
},
errors: {
src: [
`${lessFolder}/errors/*.less`,
`${testFolder}/errors/javascript-error.less`,
2023-08-17 09:47:40 +00:00
'test/browser/less/errors/*.less'
2022-01-21 08:28:41 +00:00
],
options: {
timeout: 20000,
2023-08-17 09:47:40 +00:00
helpers: 'test/browser/runner-errors-options.js',
specs: 'test/browser/runner-errors-spec.js',
outfile: 'tmp/browser/test-runner-errors.html'
2022-01-21 08:28:41 +00:00
}
},
noJsErrors: {
src: [`${lessFolder}/no-js-errors/*.less`],
options: {
2023-08-17 09:47:40 +00:00
helpers: 'test/browser/runner-no-js-errors-options.js',
specs: 'test/browser/runner-no-js-errors-spec.js',
outfile: 'tmp/browser/test-runner-no-js-errors.html'
2022-01-21 08:28:41 +00:00
}
},
browser: {
src: [
2023-08-17 09:47:40 +00:00
'test/browser/less/*.less',
'test/browser/less/plugin/*.less'
2022-01-21 08:28:41 +00:00
],
options: {
2023-08-17 09:47:40 +00:00
helpers: 'test/browser/runner-browser-options.js',
specs: 'test/browser/runner-browser-spec.js',
outfile: 'tmp/browser/test-runner-browser.html'
2022-01-21 08:28:41 +00:00
}
},
relativeUrls: {
2023-08-17 09:47:40 +00:00
src: ['test/browser/less/relative-urls/*.less'],
2022-01-21 08:28:41 +00:00
options: {
2023-08-17 09:47:40 +00:00
helpers: 'test/browser/runner-relative-urls-options.js',
specs: 'test/browser/runner-relative-urls-spec.js',
outfile: 'tmp/browser/test-runner-relative-urls.html'
2022-01-21 08:28:41 +00:00
}
},
rewriteUrls: {
2023-08-17 09:47:40 +00:00
src: ['test/browser/less/rewrite-urls/*.less'],
2022-01-21 08:28:41 +00:00
options: {
2023-08-17 09:47:40 +00:00
helpers: 'test/browser/runner-rewrite-urls-options.js',
specs: 'test/browser/runner-rewrite-urls-spec.js',
outfile: 'tmp/browser/test-runner-rewrite-urls.html'
2022-01-21 08:28:41 +00:00
}
},
rootpath: {
2023-08-17 09:47:40 +00:00
src: ['test/browser/less/rootpath/*.less'],
2022-01-21 08:28:41 +00:00
options: {
2023-08-17 09:47:40 +00:00
helpers: 'test/browser/runner-rootpath-options.js',
specs: 'test/browser/runner-rootpath-spec.js',
outfile: 'tmp/browser/test-runner-rootpath.html'
2022-01-21 08:28:41 +00:00
}
},
rootpathRelative: {
2023-08-17 09:47:40 +00:00
src: ['test/browser/less/rootpath-relative/*.less'],
2022-01-21 08:28:41 +00:00
options: {
2023-08-17 09:47:40 +00:00
helpers: 'test/browser/runner-rootpath-relative-options.js',
specs: 'test/browser/runner-rootpath-relative-spec.js',
outfile: 'tmp/browser/test-runner-rootpath-relative.html'
2022-01-21 08:28:41 +00:00
}
},
rootpathRewriteUrls: {
2023-08-17 09:47:40 +00:00
src: ['test/browser/less/rootpath-rewrite-urls/*.less'],
2022-01-21 08:28:41 +00:00
options: {
helpers:
2023-08-17 09:47:40 +00:00
'test/browser/runner-rootpath-rewrite-urls-options.js',
specs: 'test/browser/runner-rootpath-rewrite-urls-spec.js',
2022-01-21 08:28:41 +00:00
outfile:
2023-08-17 09:47:40 +00:00
'tmp/browser/test-runner-rootpath-rewrite-urls.html'
2022-01-21 08:28:41 +00:00
}
},
production: {
2023-08-17 09:47:40 +00:00
src: ['test/browser/less/production/*.less'],
2022-01-21 08:28:41 +00:00
options: {
2023-08-17 09:47:40 +00:00
helpers: 'test/browser/runner-production-options.js',
specs: 'test/browser/runner-production-spec.js',
outfile: 'tmp/browser/test-runner-production.html'
2022-01-21 08:28:41 +00:00
}
},
modifyVars: {
2023-08-17 09:47:40 +00:00
src: ['test/browser/less/modify-vars/*.less'],
2022-01-21 08:28:41 +00:00
options: {
2023-08-17 09:47:40 +00:00
helpers: 'test/browser/runner-modify-vars-options.js',
specs: 'test/browser/runner-modify-vars-spec.js',
outfile: 'tmp/browser/test-runner-modify-vars.html'
2022-01-21 08:28:41 +00:00
}
},
globalVars: {
2023-08-17 09:47:40 +00:00
src: ['test/browser/less/global-vars/*.less'],
2022-01-21 08:28:41 +00:00
options: {
2023-08-17 09:47:40 +00:00
helpers: 'test/browser/runner-global-vars-options.js',
specs: 'test/browser/runner-global-vars-spec.js',
outfile: 'tmp/browser/test-runner-global-vars.html'
2022-01-21 08:28:41 +00:00
}
},
postProcessorPlugin: {
src: [`${lessFolder}/postProcessorPlugin/*.less`],
options: {
helpers: [
2023-08-17 09:47:40 +00:00
'test/plugins/postprocess/index.js',
'test/browser/runner-postProcessorPlugin-options.js'
2022-01-21 08:28:41 +00:00
],
2023-08-17 09:47:40 +00:00
specs: 'test/browser/runner-postProcessorPlugin.js',
2022-01-21 08:28:41 +00:00
outfile:
2023-08-17 09:47:40 +00:00
'tmp/browser/test-runner-post-processor-plugin.html'
2022-01-21 08:28:41 +00:00
}
},
preProcessorPlugin: {
src: [`${lessFolder}/preProcessorPlugin/*.less`],
options: {
helpers: [
2023-08-17 09:47:40 +00:00
'test/plugins/preprocess/index.js',
'test/browser/runner-preProcessorPlugin-options.js'
2022-01-21 08:28:41 +00:00
],
2023-08-17 09:47:40 +00:00
specs: 'test/browser/runner-preProcessorPlugin.js',
outfile: 'tmp/browser/test-runner-pre-processor-plugin.html'
2022-01-21 08:28:41 +00:00
}
},
visitorPlugin: {
src: [`${lessFolder}/visitorPlugin/*.less`],
options: {
helpers: [
2023-08-17 09:47:40 +00:00
'test/plugins/visitor/index.js',
'test/browser/runner-VisitorPlugin-options.js'
2022-01-21 08:28:41 +00:00
],
2023-08-17 09:47:40 +00:00
specs: 'test/browser/runner-VisitorPlugin.js',
outfile: 'tmp/browser/test-runner-visitor-plugin.html'
2022-01-21 08:28:41 +00:00
}
},
filemanagerPlugin: {
src: [`${lessFolder}/filemanagerPlugin/*.less`],
options: {
helpers: [
2023-08-17 09:47:40 +00:00
'test/plugins/filemanager/index.js',
'test/browser/runner-filemanagerPlugin-options.js'
2022-01-21 08:28:41 +00:00
],
2023-08-17 09:47:40 +00:00
specs: 'test/browser/runner-filemanagerPlugin.js',
outfile: 'tmp/browser/test-runner-filemanager-plugin.html'
2022-01-21 08:28:41 +00:00
}
}
}