File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
packages/@vuepress/test-utils/lib Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 11const execa = require ( 'execa' )
2- const rawArgs = process . argv . slice ( 2 )
32
43const usedPorts = [ ]
54
6- module . exports = function createJestRunner ( jestArgs ) {
5+ /**
6+ * Run jest
7+ *
8+ * @param {array } jestArgs an array of Jest CLI options
9+ * @param {array } rawArgs the processed process.argv - contains '--inspect-brk' for debug
10+ */
11+
12+ module . exports = function createJestRunner ( jestArgs , rawArgs ) {
713 return async function ( ) {
814 const execArgv = getChildProcesExecArgv ( )
915 const args = [ ...execArgv , ...jestArgs ]
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ const args = minimist(rawArgs)
88let regex
99if ( args . p ) {
1010 const packages = ( args . p || args . package ) . split ( ',' ) . join ( '|' )
11- regex = `.*@vuepress/(${ packages } |plugin-(${ packages } ))/.*\\.spec\\.js $`
11+ regex = `.*@vuepress/(${ packages } |plugin-(${ packages } ))/.*\\.spec\\.(js|ts) $`
1212 const i = rawArgs . indexOf ( '-p' )
1313 rawArgs . splice ( i , 2 )
1414}
@@ -17,7 +17,7 @@ const jestRunner = createJestRunner([
1717 '--config' , 'scripts/jest.config.js' ,
1818 '--runInBand' ,
1919 ...( regex ? [ regex ] : [ ] )
20- ] )
20+ ] , rawArgs )
2121
2222// ensure the basic temp files were generated
2323createApp ( {
You can’t perform that action at this time.
0 commit comments