File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -3,19 +3,31 @@ import { resolve } from 'path'
33const jest = require ( 'jest' )
44
55command (
6- 'test' ,
6+ 'test [--watch] [--watchAll] ' ,
77 'run unit-tests on your project' ,
88 args => {
99 return args
1010 } ,
1111 args => {
12- test ( )
12+ const watch = args . watch || false
13+ const watchAll = args . watchAll || false
14+ test ( watch , watchAll )
1315 }
1416)
17+ . option ( 'watch' , {
18+ default : false ,
19+ description : 're-run tests when files change'
20+ } )
21+ . option ( 'watchAll' , {
22+ default : false ,
23+ description : 're-run tests when files change regardless of git diff'
24+ } )
1525
16- function test ( ) {
26+ function test ( watch : boolean , watchAll : boolean ) {
1727 jest . runCLI (
1828 {
29+ watch,
30+ watchAll,
1931 globals : JSON . stringify ( {
2032 __TRANSFORM_HTML__ : true ,
2133 'ts-jest' : {
You can’t perform that action at this time.
0 commit comments