1 ---
2 title: npm-test
3 section: 1
4 description: Test a package
5 github_repo: npm/cli
6 github_branch: release/v6
7 github_path: docs/content/commands/npm-test.md
8 redirect_from:
9 - /cli-documentation/v6/cli-commands/npm-test
10 - /cli-documentation/v6/cli-commands/test
11 - /cli-documentation/v6/commands/npm-test
12 - /cli-documentation/v6/commands/test
13 - /cli-documentation/v6/npm-test
14 - /cli-documentation/v6/test
15 - /cli/v6/cli-commands/npm-test
16 - /cli/v6/cli-commands/test
17 - /cli/v6/commands/test
18 - /cli/v6/npm-test
19 - /cli/v6/test
20 ---
21
22 ### Synopsis
23
24 ```bash
25 npm test [-- <args>]
26
27 aliases: t, tst
28 ```
29
30 ### Description
31
32 This runs a package's "test" script, if one was provided.
33
34 ### See Also
35
36 - [npm run-script](/cli/v6/commands/npm-run-script)
37 - [npm scripts](/cli/v6/using-npm/scripts)
38 - [npm start](/cli/v6/commands/npm-start)
39 - [npm restart](/cli/v6/commands/npm-restart)
40 - [npm stop](/cli/v6/commands/npm-stop)