mirror of
https://github.com/nodejs/node.git
synced 2025-05-16 13:53:32 +00:00

Closes: https://github.com/nodejs/node/pull/16280 PR-URL: https://github.com/nodejs/node/pull/16509 Fixes: https://github.com/nodejs/node/issues/14161 Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com>
16 lines
324 B
JavaScript
16 lines
324 B
JavaScript
module.exports = test
|
|
|
|
const testCmd = require('./utils/lifecycle-cmd.js')('test')
|
|
|
|
test.usage = testCmd.usage
|
|
|
|
function test (args, cb) {
|
|
testCmd(args, function (er) {
|
|
if (!er) return cb()
|
|
if (er.code === 'ELIFECYCLE') {
|
|
return cb('Test failed. See above for more details.')
|
|
}
|
|
return cb(er)
|
|
})
|
|
}
|