split up integration tests for windows

This commit is contained in:
Tobias Koppers 2021-07-13 16:50:12 +02:00
parent 49182bf5ad
commit f252dc868d
12 changed files with 27 additions and 11 deletions

View File

@ -109,14 +109,26 @@ jobs:
pool:
vmImage: windows-latest
strategy:
maxParallel: 3
maxParallel: 6
matrix:
node-10:
node-10-a:
node_version: ^10.13.0
node-12:
part: a
node-10-b:
node_version: ^10.13.0
part: b
node-12-a:
node_version: ^12.4.0
node-16:
part: a
node-12-b:
node_version: ^12.4.0
part: b
node-16-a:
node_version: ^16.0.0
part: a
node-16-b:
node_version: ^16.0.0
part: b
steps:
- task: NodeTool@0
inputs:
@ -142,7 +154,7 @@ jobs:
- script: yarn link webpack --frozen-lockfile
displayName: "Link webpack into node_modules"
- script: |
yarn cover:integration --ci --maxWorkers=2 --reporters=default --reporters=jest-junit
yarn cover:integration:$(part) --ci --maxWorkers=2 --reporters=default --reporters=jest-junit
yarn cover:merge
env:
CI: "true"

View File

@ -135,8 +135,8 @@
"jest": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --logHeapUsage",
"test": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --logHeapUsage",
"test:update-snapshots": "yarn jest -u",
"test:integration": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --logHeapUsage --testMatch \"<rootDir>/test/*.test.js\"",
"test:basic": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --logHeapUsage --testMatch \"<rootDir>/te{st/TestCasesNormal,st/StatsTestCases,st/ConfigTestCases}.test.js\"",
"test:integration": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --logHeapUsage --testMatch \"<rootDir>/test/*.{basictest,longtest,test}.js\"",
"test:basic": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --logHeapUsage --testMatch \"<rootDir>/test/*.basictest.js\"",
"test:unit": "node --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\"",
"travis:integration": "yarn cover:integration --ci $JEST",
"travis:basic": "yarn cover:basic --ci $JEST",
@ -168,8 +168,10 @@
"cover": "yarn cover:all && yarn cover:report",
"cover:clean": "rimraf .nyc_output coverage",
"cover:all": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --logHeapUsage --coverage",
"cover:basic": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --logHeapUsage --testMatch \"<rootDir>/te{st/TestCasesNormal,st/StatsTestCases,st/ConfigTestCases}.test.js\" --coverage",
"cover:integration": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --logHeapUsage --testMatch \"<rootDir>/test/*.test.js\" --coverage",
"cover:basic": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --logHeapUsage --testMatch \"<rootDir>/test/*.basictest.js\" --coverage",
"cover:integration": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --logHeapUsage --testMatch \"<rootDir>/test/*.{basictest,longtest,test}.js\" --coverage",
"cover:integration:a": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --logHeapUsage --testMatch \"<rootDir>/test/*.test.js\" --coverage",
"cover:integration:b": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --logHeapUsage --testMatch \"<rootDir>/test/*.{basictest,longtest}.js\" --coverage",
"cover:unit": "node --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\" --coverage",
"cover:types": "node node_modules/tooling/type-coverage",
"cover:merge": "nyc merge .nyc_output coverage/coverage-nyc.json && rimraf .nyc_output",
@ -193,6 +195,8 @@
],
"testMatch": [
"<rootDir>/test/*.test.js",
"<rootDir>/test/*.basictest.js",
"<rootDir>/test/*.longtest.js",
"<rootDir>/test/*.unittest.js"
],
"watchPathIgnorePatterns": [

View File

@ -38,12 +38,12 @@ To add a new case, create a new directory inside of the top level test groups, a
By default this file will be the entry point for the test suite and you can add your `it()`'s there. This will also become bundled so that node env support happens as well.
#### configCases (`ConfigTestCases.test.js`) <sup>1</sup>
#### configCases (`ConfigTestCases.basictest.js`) <sup>1</sup>
If you are trying to solve a bug which is reproducible when x and y properties are used together in a config, then configCases is the place to be!!!!
In addition to an `index.js`, these configCases require a `webpack.config.js` is located inside of your test suite. This will run this specific config through `webpack` just as you were building individually. They will use the same loading/bundling technique of your `it()` tests, however you now have a more specific config use cases that you can write even before you start coding.
#### statsCases (`StatsTestCases.test.js`)
#### statsCases (`StatsTestCases.basictest.js`)
Stats cases are similar to configCases except specifically focusing on the `expected` output of your stats. Instead of writing to the console, however the output of stats will be written to disk.
By default, the "expected" outcome is a pain to write by hand so instead when statsCases are run, runner is checking output using jest's awesome snapshot functionality.