2025-12-16 10:20:31 -07:00
|
|
|
# npm install-test
|
|
|
|
|
|
|
|
|
|
> Equivalent to running `npm install` followed by `npm test`.
|
|
|
|
|
> Note: `it` can be used as shorthand for `install-test`.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://docs.npmjs.com/cli/npm-install-test/>.
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Install all dependencies and then run tests:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`npm {{[it|install-test]}}`
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Install a specific package and then run tests:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`npm {{[it|install-test]}} {{package_name}}`
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Install a package and save it as a dependency before running tests:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`npm {{[it|install-test]}} {{package_name}} {{[-S|--save]}}`
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Install dependencies globally and then run tests:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`npm {{[it|install-test]}} {{[-g|--global]}}`
|