Skip to content

Commit d210e78

Browse files
YuJianrongyyx990803
authored andcommitted
fix(e2e-cypress): merge --config option for cypress (vuejs#2048)
Fix vuejs#2047 by joining the config from user with internal `baseUrl`
1 parent 2243515 commit d210e78

File tree

1 file changed

+3
-1
lines changed
  • packages/@vue/cli-plugin-e2e-cypress

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,18 @@ module.exports = (api, options) => {
1717
removeArg(rawArgs, 'headless', 0)
1818
removeArg(rawArgs, 'mode')
1919
removeArg(rawArgs, 'url')
20+
removeArg(rawArgs, 'config')
2021

2122
info(`Starting e2e tests...`)
2223

2324
const { url, server } = args.url
2425
? { url: args.url }
2526
: await api.service.run('serve')
2627

28+
const configs = typeof args.config === 'string' ? args.config.split(',') : []
2729
const cyArgs = [
2830
args.headless ? 'run' : 'open', // open or run
29-
'--config', `baseUrl=${url}`,
31+
'--config', [`baseUrl=${url}`, ...configs].join(','),
3032
...rawArgs
3133
]
3234

0 commit comments

Comments
 (0)