Make npm run testonly the alias for npm test, not the other way around.

This is closer to removing `npm run testonly` which seems less intuitive
than it could be since, grammatically speaking, the `npm test` command
implies that it's only doing testing, not also recompilation.

Testing environments should already be configured to run `npm install`
followed by `npm test` (or the shorthands: `npm install-test` and `npm it`)

Therefore, if someone _wants_ the full recompilation running `npm it` again
will replicate the behavior previously accomplished by `npm test`.  I find
this more intuitive since the `npm install` step was already doing the
complication (and necessary to produce a functioning Apollo Server monorepo).

And similarly, `npm test` now just runs the tests, rather than the more
expensive recompilation.  This should become even more useful when we move
to a pattern where `tsc` incremental building is implemented.
This commit is contained in:
Jesse Rosenberger 2018-09-25 13:49:28 +03:00
parent d68f518d03
commit f7d479b907
No known key found for this signature in database
GPG key ID: C0CCCF81AA6C08D8

View file

@ -11,12 +11,11 @@
"compile": "lerna run compile",
"lint": "prettier-check --ignore-path .gitignore \"{docs/{,source/**},.,packages/**,test}/{*.js,*.ts}\"",
"lint-fix": "prettier --write --ignore-path .gitignore \"{docs/{,source/**},.,packages/**,test}/{*.js,*.ts}\"",
"pretest": "npm run compile",
"test": "npm run testonly",
"test": "jest --verbose",
"posttest": "npm run lint",
"testonly": "jest --verbose",
"test:watch": "npm run testonly -- --watch",
"test:ci": "npm run testonly -- --ci --maxWorkers=2",
"testonly": "npm test",
"test:watch": "npm test -- --watch",
"test:ci": "npm test -- --ci --maxWorkers=2",
"release": "npm run clean && npm ci && lerna publish --exact",
"precommit": "lint-staged",
"clean": "find . -name \"node_modules\" -exec rm -rf '{}' + && find . -name \"dist\" -exec rm -rf '{}' +"