Skip to content

Commit 23f01b7

Browse files
committed
fix(docs): clean up npm test docs
Adds an example and standardizes the language w/ start and stop PR-URL: #2462 Credit: @wraithgar Close: #2462 Reviewed-by: @darcyclarke
1 parent 307b3bd commit 23f01b7

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

docs/content/commands/npm-test.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,28 @@ aliases: t, tst
1414

1515
### Description
1616

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+
33+
> node test.js
34+
35+
(test.js output would be here)
36+
```
37+
38+
1839

1940
### See Also
2041

0 commit comments

Comments
 (0)