File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
packages/@vue/cli-plugin-unit-mocha Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,17 @@ module.exports = api => {
37
37
`https://sysgears.github.io/mochapack/docs/installation/cli-usage.html`
38
38
)
39
39
} , ( args , rawArgv ) => {
40
- const inspectPos = rawArgv . indexOf ( '--inspect-brk' )
40
+ const inspectStringPrefix = '--inspect-brk'
41
+ const matchedInspectArg = rawArgv . filter ( ( value ) => {
42
+ return ( value . substring ( 0 , inspectStringPrefix . length ) === inspectStringPrefix )
43
+ } )
44
+
41
45
let nodeArgs = [ ]
42
- if ( inspectPos !== - 1 ) {
46
+
47
+ let inspectArg = ''
48
+ if ( matchedInspectArg . length !== 0 ) {
49
+ inspectArg = matchedInspectArg [ 0 ]
50
+ const inspectPos = rawArgv . indexOf ( inspectArg )
43
51
nodeArgs = rawArgv . splice ( inspectPos , inspectPos + 1 )
44
52
}
45
53
// for @vue /babel-preset-app <= v4.0.0-rc.7
You can’t perform that action at this time.
0 commit comments