npm-test.1 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. .TH "NPM\-TEST" "1" "October 2021" "" ""
  2. .SH "NAME"
  3. \fBnpm-test\fR \- Test a package
  4. .SS Synopsis
  5. .P
  6. .RS 2
  7. .nf
  8. npm test [\-\- <args>]
  9. aliases: t, tst
  10. .fi
  11. .RE
  12. .SS Description
  13. .P
  14. This runs a predefined command specified in the \fB"test"\fP property of
  15. a package's \fB"scripts"\fP object\.
  16. .SS Example
  17. .P
  18. .RS 2
  19. .nf
  20. {
  21. "scripts": {
  22. "test": "node test\.js"
  23. }
  24. }
  25. .fi
  26. .RE
  27. .P
  28. .RS 2
  29. .nf
  30. npm test
  31. > npm@x\.x\.x test
  32. > node test\.js
  33. (test\.js output would be here)
  34. .fi
  35. .RE
  36. .SS Configuration
  37. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS START \-\->
  38. <!\-\- automatically generated, do not edit manually \-\->
  39. <!\-\- see lib/utils/config/definitions\.js \-\->
  40. .SS \fBignore\-scripts\fP
  41. .RS 0
  42. .IP \(bu 2
  43. Default: false
  44. .IP \(bu 2
  45. Type: Boolean
  46. .RE
  47. .P
  48. If true, npm does not run scripts specified in package\.json files\.
  49. .P
  50. Note that commands explicitly intended to run a particular script, such as
  51. \fBnpm start\fP, \fBnpm stop\fP, \fBnpm restart\fP, \fBnpm test\fP, and \fBnpm run\-script\fP
  52. will still run their intended script if \fBignore\-scripts\fP is set, but they
  53. will \fInot\fR run any pre\- or post\-scripts\.
  54. <!\-\- automatically generated, do not edit manually \-\->
  55. <!\-\- see lib/utils/config/definitions\.js \-\->
  56. .SS \fBscript\-shell\fP
  57. .RS 0
  58. .IP \(bu 2
  59. Default: '/bin/sh' on POSIX systems, 'cmd\.exe' on Windows
  60. .IP \(bu 2
  61. Type: null or String
  62. .RE
  63. .P
  64. The shell to use for scripts run with the \fBnpm exec\fP, \fBnpm run\fP and \fBnpm
  65. init <pkg>\fP commands\.
  66. <!\-\- automatically generated, do not edit manually \-\->
  67. <!\-\- see lib/utils/config/definitions\.js \-\->
  68. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS END \-\->
  69. .SS See Also
  70. .RS 0
  71. .IP \(bu 2
  72. npm help run\-script
  73. .IP \(bu 2
  74. npm help scripts
  75. .IP \(bu 2
  76. npm help start
  77. .IP \(bu 2
  78. npm help restart
  79. .IP \(bu 2
  80. npm help stop
  81. .RE