mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Build: Run pretest before test:* npm scripts
Build was already happening in scripts like `test:browser` but those scripts were missing `pretest`, meaning that running `npm install && npm test:browser` may have failed if `pretest` wasn't run before or if its results were out of date. Even worse, with such stale data some tests may erroneously succeed. This also removes a separate `pretest` step from GitHub Actions as it's no longer needed. Closes gh-5338
This commit is contained in:
parent
ace646f6e8
commit
1ad66aeb6d
3
.github/workflows/node.js.yml
vendored
3
.github/workflows/node.js.yml
vendored
@ -74,9 +74,6 @@ jobs:
|
||||
run: npm run build:all && npm run lint
|
||||
if: matrix.NODE_VERSION == '18.x'
|
||||
|
||||
- name: Prepare tests
|
||||
run: npm run pretest
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
BROWSERS: ${{ matrix.BROWSERS }}
|
||||
|
16
package.json
16
package.json
@ -52,14 +52,14 @@
|
||||
"pretest": "npm run qunit-fixture && npm run babel:tests && npm run npmcopy",
|
||||
"qunit-fixture": "node build/tasks/qunit-fixture.js",
|
||||
"start": "node -e \"require('./build/tasks/build.js').buildDefaultFiles({ watch: true })\"",
|
||||
"test:browserless": "npm run test:node_smoke_tests && npm run test:promises_aplus && npm run test:jsdom",
|
||||
"test:browser": "npm run build:all && grunt karma:main",
|
||||
"test:esmodules": "npm run build:main && grunt karma:esmodules",
|
||||
"test:jsdom": "npm run build:main && grunt test:jsdom",
|
||||
"test:no-deprecated": "npm run build -- -e deprecated && grunt karma:main",
|
||||
"test:selector-native": "npm run build -- -e selector && grunt karma:main",
|
||||
"test:slim": "npm run build -- --slim && grunt karma:main",
|
||||
"test:node_smoke_tests": "npm run build:all && node build/tasks/node_smoke_tests.js",
|
||||
"test:browserless": "npm run pretest && npm run test:node_smoke_tests && npm run test:promises_aplus && npm run test:jsdom",
|
||||
"test:browser": "npm run pretest && npm run build:all && grunt karma:main",
|
||||
"test:esmodules": "npm run pretest && npm run build:main && grunt karma:esmodules",
|
||||
"test:jsdom": "npm run pretest && npm run build:main && grunt test:jsdom",
|
||||
"test:no-deprecated": "npm run pretest && npm run build -- -e deprecated && grunt karma:main",
|
||||
"test:selector-native": "npm run pretest && npm run build -- -e selector && grunt karma:main",
|
||||
"test:slim": "npm run pretest && npm run build -- --slim && grunt karma:main",
|
||||
"test:node_smoke_tests": "npm run pretest && npm run build:all && node build/tasks/node_smoke_tests.js",
|
||||
"test:promises_aplus": "npm run build:main && node build/tasks/promises_aplus_tests.js",
|
||||
"test": "npm run build:all && npm run lint && npm run test:browserless && npm run test:browser && npm run test:esmodules && npm run test:slim && npm run test:no-deprecated && npm run test:selector-native"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user