1NPM-TEST(1)                                                        NPM-TEST(1)
2
3
4

NAME

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