Skip to content

Commit

Permalink
Test-data module (#3525)
Browse files Browse the repository at this point in the history
* Move test data to separate module - @todo--fix some browser tests
* Fix all browser tests
  • Loading branch information
matthew-dean authored Jun 25, 2020
1 parent 51fb02b commit 0925cf1
Show file tree
Hide file tree
Showing 508 changed files with 237 additions and 7,440 deletions.
7,171 changes: 0 additions & 7,171 deletions package-lock.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/less/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ Gruntfile.js
dist/*
tmp/*
lib/*
test/browser/vendor/*
test/browser/less.min.js
28 changes: 17 additions & 11 deletions packages/less/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
"use strict";

var resolve = require('resolve');
var path = require('path');

var testFolder = path.relative(process.cwd(), path.dirname(resolve.sync('@less/test-data')));
var lessFolder = path.join(testFolder, 'less');

module.exports = function(grunt) {
grunt.option("stack", true);

Expand Down Expand Up @@ -235,32 +241,32 @@ module.exports = function(grunt) {
// @TODO: make this more thorough
// CURRENT OPTIONS
// --math
"node bin/lessc --math=always test/less/_main/lazy-eval.less tmp/lazy-eval.css",
"node bin/lessc --math=parens-division test/less/_main/lazy-eval.less tmp/lazy-eval.css",
"node bin/lessc --math=parens test/less/_main/lazy-eval.less tmp/lazy-eval.css",
"node bin/lessc --math=strict test/less/_main/lazy-eval.less tmp/lazy-eval.css",
"node bin/lessc --math=strict-legacy test/less/_main/lazy-eval.less tmp/lazy-eval.css",
`node bin/lessc --math=always ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`,
`node bin/lessc --math=parens-division ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`,
`node bin/lessc --math=parens ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`,
`node bin/lessc --math=strict ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`,
`node bin/lessc --math=strict-legacy ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`,

// DEPRECATED OPTIONS
// --strict-math
"node bin/lessc --strict-math=on test/less/_main/lazy-eval.less tmp/lazy-eval.css"
`node bin/lessc --strict-math=on ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`
].join(" && ")
},
plugin: {
command: [
'node bin/lessc --clean-css="--s1 --advanced" test/less/_main/lazy-eval.less tmp/lazy-eval.css',
`node bin/lessc --clean-css="--s1 --advanced" ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`,
"cd lib",
'node ../bin/lessc --clean-css="--s1 --advanced" ../test/less/_main/lazy-eval.less ../tmp/lazy-eval.css',
`node ../bin/lessc --clean-css="--s1 --advanced" ../${lessFolder}/_main/lazy-eval.less ../tmp/lazy-eval.css`,
"cd ..",
// Test multiple plugins
'node bin/lessc --plugin=clean-css="--s1 --advanced" --plugin=autoprefix="ie 11,Edge >= 13,Chrome >= 47,Firefox >= 45,iOS >= 9.2,Safari >= 9" test/less/_main/lazy-eval.less tmp/lazy-eval.css'
`node bin/lessc --plugin=clean-css="--s1 --advanced" --plugin=autoprefix="ie 11,Edge >= 13,Chrome >= 47,Firefox >= 45,iOS >= 9.2,Safari >= 9" ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`
].join(" && ")
},
"sourcemap-test": {
// quoted value doesn't seem to get picked up by time-grunt, or isn't output, at least; maybe just "sourcemap" is fine?
command: [
"node bin/lessc --source-map=test/sourcemaps/maps/import-map.map test/less/_main/import.less test/sourcemaps/import.css",
"node bin/lessc --source-map test/less/sourcemaps/basic.less test/sourcemaps/basic.css"
`node bin/lessc --source-map=test/sourcemaps/maps/import-map.map ${lessFolder}/_main/import.less test/sourcemaps/import.css`,
`node bin/lessc --source-map ${lessFolder}/sourcemaps/basic.less test/sourcemaps/basic.css`
].join(" && ")
}
},
Expand Down
7 changes: 5 additions & 2 deletions packages/less/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@
"benchmark",
"bin",
"lib",
"src",
"build",
"test",
"*.md",
"LICENSE",
"Gruntfile.js",
"*.json",
"*.yml",
".gitattributes",
".jshintrc",
".npmignore"
".npmignore",
".eslintignore",
"tsconfig.json"
]
}
71 changes: 40 additions & 31 deletions packages/less/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 13 additions & 11 deletions packages/less/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
"node": ">=6"
},
"scripts": {
"test": "grunt test",
"grunt": "grunt",
"changelog": "github-changes -o less -r less.js -a --only-pulls --use-commit-body -m \"(YYYY-MM-DD)\"",
"build": "npm-run-all clean compile",
"clean": "shx rm -rf ./lib tsconfig.tsbuildinfo",
"compile": "tsc -p tsconfig.json",
"dev": "tsc -p tsconfig.json -w"
},
"test": "grunt test",
"grunt": "grunt",
"changelog": "github-changes -o less -r less.js -a --only-pulls --use-commit-body -m \"(YYYY-MM-DD)\"",
"build": "npm-run-all clean compile",
"clean": "shx rm -rf ./lib tsconfig.tsbuildinfo",
"compile": "tsc -p tsconfig.json",
"dev": "tsc -p tsconfig.json -w"
},
"optionalDependencies": {
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
Expand All @@ -53,13 +53,14 @@
"source-map": "~0.6.0"
},
"devDependencies": {
"@less/test-data": "3.12.0",
"@less/test-import-module": "3.12.0",
"@typescript-eslint/eslint-plugin": "^3.3.0",
"@typescript-eslint/parser": "^3.3.0",
"benny": "^3.6.12",
"bootstrap-less-port": "0.3.0",
"copy-anything": "^2.0.1",
"chai": "^4.2.0",
"copy-anything": "^2.0.1",
"diff": "^3.2.0",
"eslint": "^6.8.0",
"fs-extra": "^8.1.0",
Expand All @@ -80,12 +81,13 @@
"minimist": "^1.2.0",
"mocha": "^6.2.1",
"mocha-headless-chrome": "^2.0.3",
"mocha-teamcity-reporter": "^3.0.0",
"npm-run-all": "^4.1.5",
"mocha-teamcity-reporter": "^3.0.0",
"npm-run-all": "^4.1.5",
"performance-now": "^0.2.0",
"phin": "^2.2.3",
"promise": "^7.1.1",
"read-glob": "^3.0.0",
"resolve": "^1.17.0",
"rollup": "^1.17.0",
"rollup-plugin-commonjs": "^10.0.1",
"rollup-plugin-node-resolve": "^5.2.0",
Expand Down
Loading

0 comments on commit 0925cf1

Please sign in to comment.