2021-05-10 17:31:02 -04:00
|
|
|
.TH "NPM\-TEST" "1" "May 2021" "" ""
|
2011-11-26 09:21:03 -08:00
|
|
|
.SH "NAME"
|
2019-11-18 21:01:39 +02:00
|
|
|
\fBnpm-test\fR \- Test a package
|
2019-11-05 14:55:08 -05:00
|
|
|
.SS Synopsis
|
2014-09-24 14:41:07 -07:00
|
|
|
.P
|
|
|
|
.RS 2
|
2014-11-04 15:08:12 -08:00
|
|
|
.nf
|
2019-11-05 14:55:08 -05:00
|
|
|
npm test [\-\- <args>]
|
2016-03-29 23:30:51 -07:00
|
|
|
|
2019-11-05 14:55:08 -05:00
|
|
|
aliases: t, tst
|
2014-11-04 15:08:12 -08:00
|
|
|
.fi
|
2014-09-24 14:41:07 -07:00
|
|
|
.RE
|
2019-11-05 14:55:08 -05:00
|
|
|
.SS Description
|
2014-09-24 14:41:07 -07:00
|
|
|
.P
|
2021-01-15 16:09:24 -05:00
|
|
|
This runs a predefined command specified in the \fB"test"\fP property of
|
|
|
|
a package's \fB"scripts"\fP object\.
|
|
|
|
.SS Example
|
|
|
|
.P
|
|
|
|
.RS 2
|
|
|
|
.nf
|
|
|
|
{
|
|
|
|
"scripts": {
|
|
|
|
"test": "node test\.js"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.fi
|
|
|
|
.RE
|
|
|
|
.P
|
|
|
|
.RS 2
|
|
|
|
.nf
|
|
|
|
npm test
|
|
|
|
> npm@x\.x\.x test
|
|
|
|
> node test\.js
|
|
|
|
|
|
|
|
(test\.js output would be here)
|
|
|
|
.fi
|
|
|
|
.RE
|
2019-11-05 14:55:08 -05:00
|
|
|
.SS See Also
|
2014-09-24 14:41:07 -07:00
|
|
|
.RS 0
|
|
|
|
.IP \(bu 2
|
2019-11-18 21:01:39 +02:00
|
|
|
npm help run\-script
|
2014-09-24 14:41:07 -07:00
|
|
|
.IP \(bu 2
|
2019-11-05 14:55:08 -05:00
|
|
|
npm help scripts
|
2014-09-24 14:41:07 -07:00
|
|
|
.IP \(bu 2
|
2019-11-18 21:01:39 +02:00
|
|
|
npm help start
|
2014-09-24 14:41:07 -07:00
|
|
|
.IP \(bu 2
|
2019-11-18 21:01:39 +02:00
|
|
|
npm help restart
|
2014-09-24 14:41:07 -07:00
|
|
|
.IP \(bu 2
|
2019-11-18 21:01:39 +02:00
|
|
|
npm help stop
|
2014-09-24 14:41:07 -07:00
|
|
|
|
|
|
|
.RE
|