mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 15:16:50 +00:00
Hygiene: rename NPM test:node to test:unit
Rename the NPM test:node script to test:unit for consistency with MobileFrontend. Change-Id: I7329592ab5b375d816cd36a28a04cbe1d8f044a5
This commit is contained in:
parent
724d930c00
commit
6859d6f828
|
@ -28,12 +28,12 @@ After an `npm install`:
|
||||||
* You can find the QUnit tests that depend on running MediaWiki under
|
* You can find the QUnit tests that depend on running MediaWiki under
|
||||||
`tests/qunit/`
|
`tests/qunit/`
|
||||||
* You can find the isolated QUnit tests under `tests/node-qunit/`, which you
|
* You can find the isolated QUnit tests under `tests/node-qunit/`, which you
|
||||||
can run with `npm run test:node`
|
can run with `npm run test:unit`
|
||||||
* We recommend you install a file watcher like `nodemon` to watch sources and
|
* We recommend you install a file watcher like `nodemon` to watch sources and
|
||||||
auto run linting and tests.
|
auto run linting and tests.
|
||||||
* `npm install -g nodemon`
|
* `npm install -g nodemon`
|
||||||
* Example running linting and node unit tests:
|
* Example running linting and node unit tests:
|
||||||
* `nodemon -w src/ --exec "grunt lint:all && npm run test:node"`
|
* `nodemon -w src/ --exec "grunt lint:all && npm run test:unit"`
|
||||||
* Get code coverage report with `npm run coverage`
|
* Get code coverage report with `npm run coverage`
|
||||||
* Reports printed in the `coverage/` folder
|
* Reports printed in the `coverage/` folder
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ We want to:
|
||||||
## Decision
|
## Decision
|
||||||
|
|
||||||
QUnit tests will be migrated from `tests/qunit/ext.popups/` to
|
QUnit tests will be migrated from `tests/qunit/ext.popups/` to
|
||||||
`tests/node-qunit/` and will be run by the script `npm run test:node` in a node
|
`tests/node-qunit/` and will be run by the script `npm run test:unit` in a node
|
||||||
environment with access to QUnit, a fake jsdom, and jQuery. Powered by the node
|
environment with access to QUnit, a fake jsdom, and jQuery. Powered by the node
|
||||||
package `mw-node-qunit`.
|
package `mw-node-qunit`.
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
"start": "webpack -w --mode=development",
|
"start": "webpack -w --mode=development",
|
||||||
"build": "NODE_ENV=production webpack --mode=production",
|
"build": "NODE_ENV=production webpack --mode=production",
|
||||||
"lint:fix": "grunt fix",
|
"lint:fix": "grunt fix",
|
||||||
"test:node": "node tests/node-qunit/run.js 'tests/node-qunit/**/*.test.js' | tap-mocha-reporter dot",
|
"test:unit": "node tests/node-qunit/run.js 'tests/node-qunit/**/*.test.js' | tap-mocha-reporter dot",
|
||||||
"test": "npm -s run check-built-assets && grunt lint && npm -s run coverage && npm -s run -s doc && bundlesize",
|
"test": "npm -s run check-built-assets && grunt lint && npm -s run coverage && npm -s run -s doc && bundlesize",
|
||||||
"doc": "jsdoc -c jsdoc.json",
|
"doc": "jsdoc -c jsdoc.json",
|
||||||
"node-debug": "node -v && npm -v && echo 'Please ensure you are running the correct version of nvm before running this command.'",
|
"node-debug": "node -v && npm -v && echo 'Please ensure you are running the correct version of nvm before running this command.'",
|
||||||
"check-built-assets": "echo 'CHECKING BUILD SOURCES ARE COMMITTED OR STAGED' && npm -s run build && git diff --exit-code resources/dist || { npm run node-debug; false; }",
|
"check-built-assets": "echo 'CHECKING BUILD SOURCES ARE COMMITTED OR STAGED' && npm -s run build && git diff --exit-code resources/dist || { npm run node-debug; false; }",
|
||||||
"coverage": "SPAWN_WRAP_SHIM_ROOT=\"$PWD/.nyc_output\" nyc npm -s run test:node",
|
"coverage": "SPAWN_WRAP_SHIM_ROOT=\"$PWD/.nyc_output\" nyc npm -s run test:unit",
|
||||||
"precommit": "npm -s t",
|
"precommit": "npm -s t",
|
||||||
"selenium-daily": "npm run selenium-test",
|
"selenium-daily": "npm run selenium-test",
|
||||||
"selenium-test": "wdio tests/selenium/wdio.conf.js"
|
"selenium-test": "wdio tests/selenium/wdio.conf.js"
|
||||||
|
|
Loading…
Reference in a new issue