File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 88import chalk = require( 'chalk' ) ;
99import type { DeprecatedOptions } from 'jest-validate' ;
1010
11+ function formatDeprecation ( message : string ) : string {
12+ const lines = [
13+ message . replace ( / \* ( .+ ?) \* / g, ( _ , s ) => chalk . bold ( `"${ s } "` ) ) ,
14+ '' ,
15+ 'Please update your configuration.' ,
16+ ] ;
17+ return lines . map ( s => ` ${ s } ` ) . join ( '\n' ) ;
18+ }
19+
1120const deprecatedOptions : DeprecatedOptions = {
1221 browser : ( ) =>
1322 ` Option ${ chalk . bold (
@@ -78,6 +87,11 @@ const deprecatedOptions: DeprecatedOptions = {
7887 Please update your configuration.
7988 ` ,
8089
90+ testPathPattern : ( ) =>
91+ formatDeprecation (
92+ 'Option *testPathPattern* was replaced by *testPathPatterns*.' ,
93+ ) ,
94+
8195 testURL : ( _options : { testURL ?: string } ) => ` Option ${ chalk . bold (
8296 '"testURL"' ,
8397 ) } was replaced by passing the URL via ${ chalk . bold (
You can’t perform that action at this time.
0 commit comments