@@ -20,7 +20,6 @@ program
2020 . option ( "--coverageLimit [error warning...]" , "set warn(yellow) and error(red) upper limit in coverage report" )
2121 . option ( "--collectCoverage <boolean>" , "whether to collect coverage information and report" )
2222
23- . option ( "--testcase <testcases...>" , "run only specified test cases deprecated, use --testFiles instead" )
2423 . option ( "--testFiles <testFiles...>" , "run only specified test files" )
2524 . option ( "--testNamePattern <test name pattern>" , "run only tests with a name that matches the regex pattern" )
2625 . option ( "--onlyFailures" , "Run tests that failed in the previous" )
@@ -49,15 +48,7 @@ if (includes === undefined) {
4948const excludes = config . exclude || [ ] ;
5049validateArgument ( includes , excludes ) ;
5150
52- if ( options . testcase !== undefined ) {
53- console . log (
54- chalk . yellowBright (
55- "Warning: --testcase is deprecated, please use --testFiles instead, --testcase will be removed in next versions"
56- )
57- ) ;
58- }
59- const testFiles = options . testFiles || options . testcase ;
60-
51+ const testFiles = options . testFiles ?? null ;
6152const onlyFailures = options . onlyFailures || false ;
6253const testNamePattern = options . testNamePattern ?? null ;
6354
@@ -70,7 +61,7 @@ if (onlyFailures && testNamePattern !== null) {
7061const collectCoverage =
7162 Boolean ( options . collectCoverage ) ||
7263 config . collectCoverage ||
73- ( testFiles === undefined && options . testNamePattern === undefined && ! onlyFailures ) ;
64+ ( testFiles === null && options . testNamePattern === undefined && ! onlyFailures ) ;
7465
7566const getBoolean = ( optionValue , configValue ) => {
7667 if ( optionValue !== undefined ) {
0 commit comments