test: do not call process.exit during tests

This commit is contained in:
Evan You
2018-08-11 16:11:13 -04:00
parent f83f31a02e
commit a76bde100b
2 changed files with 4 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
exports.exitProcess = !process.env.VUE_CLI_API_MODE
exports.exitProcess = !process.env.VUE_CLI_API_MODE && !process.env.VUE_CLI_TEST
exports.exit = function (code) {
if (exports.exitProcess) {

View File

@@ -74,6 +74,8 @@ module.exports = (...args) => {
return create(...args).catch(err => {
stopSpinner(false) // do not persist
error(err)
process.exit(1)
if (!process.env.VUE_CLI_TEST) {
process.exit(1)
}
})
}