File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ module . exports = api => {
2
+ api . describeTask ( {
3
+ match : / v u e - c l i - s e r v i c e t e s t : u n i t / ,
4
+ description : 'mocha.tasks.test.description' ,
5
+ link : 'https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-unit-mocha#injected-commands' ,
6
+ prompts : [
7
+ {
8
+ name : 'watch' ,
9
+ type : 'confirm' ,
10
+ default : false ,
11
+ description : 'mocha.tasks.test.watch'
12
+ }
13
+ ] ,
14
+ onBeforeRun : ( { answers, args } ) => {
15
+ if ( answers . watch ) args . push ( '--watch' )
16
+ }
17
+ } )
18
+ }
Original file line number Diff line number Diff line change 543
543
"update" : " Re-record every snapshot that fails during this test run"
544
544
}
545
545
}
546
+ },
547
+ "mocha" : {
548
+ "tasks" : {
549
+ "test" : {
550
+ "description" : " Run unit tests with Mocha" ,
551
+ "watch" : " Watch files for changes and rerun tests related to changed files"
552
+ }
553
+ }
546
554
}
547
555
}
You can’t perform that action at this time.
0 commit comments