Skip to content

Commit 9daeb7b

Browse files
committed
fix: eliminate calling deprecated function in cli-plugin-e2e-cypress and cli-plugin-e2e-nightwatch
Due to webpack-dev-server's close() method became deprecated in version v4.0.0, currently vue-cli is using version ^4.7.3, everytime when cli-plugin-e2e-cypress or cli-plugin-e2e-nightwatch ran any tests a deprecation warning appeared. From now on method stop() is called instead of close() as advised by the deprecation warning. close #7157
1 parent ce97e62 commit 9daeb7b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/@vue/cli-plugin-e2e-cypress/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ module.exports = (api, options) => {
3636
resolveModule('cypress/bin/cypress', __dirname)
3737
const runner = execa(cypressBinPath, cyArgs, { stdio: 'inherit' })
3838
if (server) {
39-
runner.on('exit', () => server.close())
40-
runner.on('error', () => server.close())
39+
runner.on('exit', () => server.stop())
40+
runner.on('error', () => server.stop())
4141
}
4242

4343
if (process.env.VUE_CLI_TEST) {

packages/@vue/cli-plugin-e2e-nightwatch/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ module.exports = (api, options) => {
8080
const nightWatchBinPath = require.resolve('nightwatch/bin/nightwatch')
8181
const runner = execa(nightWatchBinPath, rawArgs, { stdio: 'inherit' })
8282
if (server) {
83-
runner.on('exit', () => server.close())
84-
runner.on('error', () => server.close())
83+
runner.on('exit', () => server.stop())
84+
runner.on('error', () => server.stop())
8585
}
8686

8787
if (process.env.VUE_CLI_TEST) {

0 commit comments

Comments
 (0)