Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fcab190

Browse filesBrowse files
elevatebarthaoqunjiang
authored andcommitted
fix(cypress): allow users to update cypress (#6062)
1 parent d06a1e8 commit fcab190
Copy full SHA for fcab190

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Filter options
  • packages/@vue/cli-plugin-e2e-cypress
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed

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

Copy file name to clipboardExpand all lines: packages/@vue/cli-plugin-e2e-cypress/index.js
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = (api, options) => {
2-
const { info, chalk, execa } = require('@vue/cli-shared-utils')
2+
const { info, chalk, execa, resolveModule } = require('@vue/cli-shared-utils')
33

44
api.registerCommand('test:e2e', {
55
description: 'run e2e tests with Cypress',
@@ -31,7 +31,9 @@ module.exports = (api, options) => {
3131
...rawArgs
3232
]
3333

34-
const cypressBinPath = require.resolve('cypress/bin/cypress')
34+
// Use loadModule to allow users to customize their Cypress dependency version.
35+
const cypressBinPath = resolveModule('cypress/bin/cypress', api.getCwd()) ||
36+
resolveModule('cypress/bin/cypress', __dirname)
3537
const runner = execa(cypressBinPath, cyArgs, { stdio: 'inherit' })
3638
if (server) {
3739
runner.on('exit', () => server.close())

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.