We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8e6450 commit 3b6108cCopy full SHA for 3b6108c
packages/@vue/cli-plugin-unit-mocha/index.js
@@ -37,9 +37,17 @@ module.exports = api => {
37
`https://sysgears.github.io/mochapack/docs/installation/cli-usage.html`
38
)
39
}, (args, rawArgv) => {
40
- const inspectPos = rawArgv.indexOf('--inspect-brk')
+ const inspectStringPrefix = '--inspect-brk'
41
+ const matchedInspectArg = rawArgv.filter((value) => {
42
+ return (value.substring(0, inspectStringPrefix.length) === inspectStringPrefix)
43
+ })
44
+
45
let nodeArgs = []
- if (inspectPos !== -1) {
46
47
+ let inspectArg = ''
48
+ if (matchedInspectArg.length !== 0) {
49
+ inspectArg = matchedInspectArg[0]
50
+ const inspectPos = rawArgv.indexOf(inspectArg)
51
nodeArgs = rawArgv.splice(inspectPos, inspectPos + 1)
52
}
53
// for @vue/babel-preset-app <= v4.0.0-rc.7
0 commit comments