fix(docs): clean up npm test docs · npm/cli@23f01b7 (original) (raw)

Original file line number Diff line number Diff line change
@@ -14,7 +14,28 @@ aliases: t, tst
14 14
15 15 ### Description
16 16
17 -This runs a package's "test" script, if one was provided.
17 +This runs a predefined command specified in the `"test"` property of
18 +a package's `"scripts"` object.
19 +
20 +### Example
21 +
22 +```json
23 +{
24 +"scripts": {
25 +"test": "node test.js"
26 + }
27 +}
28 +```
29 +
30 +```bash
31 +npm test
32 +> npm@x.x.x test
33 +> node test.js
34 +
35 +(test.js output would be here)
36 +```
37 +
38 +
18 39
19 40 ### See Also
20 41