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: tst, t
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   ignore-scripts
32       • Default: false
33
34       • Type: Boolean
35
36
37       If true, npm does not run scripts specified in package.json files.
38
39       Note that commands explicitly intended to run a particular script, such
40       as  npm start, npm stop, npm restart, npm test, and npm run-script will
41       still run their intended script if ignore-scripts is set, but they will
42       not run any pre- or post-scripts.
43
44   script-shell
45       • Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
46
47       • Type: null or String
48
49
50       The  shell  to  use  for scripts run with the npm exec, npm run and npm
51       init <package-spec> commands.
52
53   See Also
54       • npm help run-script
55
56       • npm help scripts
57
58       • npm help start
59
60       • npm help restart
61
62       • npm help stop
63
64
65
66
67                                September 2022                     NPM-TEST(1)
Impressum