Skip to content

Commit aa07942

Browse files
committed
chore: backwards compatible warnings for test commands rename
1 parent 7f2f250 commit aa07942

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ module.exports = (api, options) => {
5656

5757
return runner
5858
})
59+
60+
// TODO remove in RC
61+
api.registerCommand('e2e', (args, rawArgv) => {
62+
const { warn } = require('@vue/cli-shared-utils')
63+
warn(`Deprecation Warning: "vue-cli-service e2e" has been renamed to "vue-cli-service test:e2e".`)
64+
return api.service.run('test:e2e', args, rawArgv)
65+
})
5966
}
6067

6168
module.exports.defaultModes = {

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ module.exports = (api, options) => {
6767
return runner
6868
})
6969
})
70+
71+
// TODO remove in RC
72+
api.registerCommand('e2e', (args, rawArgv) => {
73+
const { warn } = require('@vue/cli-shared-utils')
74+
warn(`Deprecation Warning: "vue-cli-service e2e" has been renamed to "vue-cli-service test:e2e".`)
75+
return api.service.run('test:e2e', args, rawArgv)
76+
})
7077
}
7178

7279
module.exports.defaultModes = {

packages/@vue/cli-plugin-unit-jest/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ module.exports = api => {
3131
})
3232
})
3333
})
34+
35+
// TODO remove in RC
36+
api.registerCommand('test', (args, rawArgv) => {
37+
const { warn } = require('@vue/cli-shared-utils')
38+
warn(`Deprecation Warning: "vue-cli-service test" has been renamed to "vue-cli-service test:unit".`)
39+
return api.service.run('test:unit', args, rawArgv)
40+
})
3441
}
3542

3643
module.exports.defaultModes = {

packages/@vue/cli-plugin-unit-mocha/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ module.exports = api => {
7272
})
7373
})
7474
})
75+
76+
// TODO remove in RC
77+
api.registerCommand('test', (args, rawArgv) => {
78+
const { warn } = require('@vue/cli-shared-utils')
79+
warn(`Deprecation Warning: "vue-cli-service test" has been renamed to "vue-cli-service test:unit".`)
80+
return api.service.run('test:unit', args, rawArgv)
81+
})
7582
}
7683

7784
module.exports.defaultModes = {

0 commit comments

Comments
 (0)