From 7d81c8517107b221a1393739f799f1a68b667836 Mon Sep 17 00:00:00 2001 From: Michael Garvin Date: Fri, 8 Jan 2021 13:25:20 -0800 Subject: [PATCH] fix(docs): clean up `npm test` docs Adds an example and standardizes the language w/ start and stop --- docs/content/commands/npm-test.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/content/commands/npm-test.md b/docs/content/commands/npm-test.md index b8f25d520c821..140a16739d63a 100644 --- a/docs/content/commands/npm-test.md +++ b/docs/content/commands/npm-test.md @@ -14,7 +14,28 @@ aliases: t, tst ### Description -This runs a package's "test" script, if one was provided. +This runs a predefined command specified in the `"test"` property of +a package's `"scripts"` object. + +### Example + +```json +{ + "scripts": { + "test": "node test.js" + } +} +``` + +```bash +npm start +> npm@x.x.x test +> node test.js + +(test.js output would be here) +``` + + ### See Also