File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,13 +26,13 @@ ${color.yellow(' $ rs fmt [options] [files/globs...]')}
2626Format files with Prettier.
2727
2828${ color . cyan ( 'Options' ) } :
29- --write Write formatted files in place (default)
30- --check Check whether files are formatted
31- --list-different Print paths of unformatted files
32- --ignore-path <path> Path to an additional ignore file (repeatable)
29+ --write Write formatted files in place (default)
30+ --check Check whether files are formatted
31+ --list-different Print paths of unformatted files
32+ --ignore-path <path> Path to an additional ignore file (repeatable)
3333 --parallel-workers <count> Number of parallel workers
34- --stdin-filepath <path> Format stdin as if it were saved at <path>
35- -h, --help Display this help message` ;
34+ --stdin-filepath <path> Format stdin as if it were saved at <path>
35+ -h, --help Display this help message` ;
3636
3737const parseMaxWorkers = (
3838 kebabValue : string | undefined ,
Original file line number Diff line number Diff line change @@ -139,14 +139,17 @@ test('rejects file arguments with --stdin-filepath', () => {
139139} ) ;
140140
141141test ( 'provides command help' , ( ) => {
142- expect ( fmtHelpMessage ) . toContain ( 'Usage:\n $ rs fmt [options] [files/globs...]' ) ;
143- expect ( fmtHelpMessage ) . toContain ( '--write' ) ;
144- expect ( fmtHelpMessage ) . toContain ( '--check' ) ;
145- expect ( fmtHelpMessage ) . toContain ( '--list-different' ) ;
146- expect ( fmtHelpMessage ) . toContain ( '--ignore-path <path>' ) ;
147- expect ( fmtHelpMessage ) . toContain ( '--parallel-workers <count>' ) ;
148- expect ( fmtHelpMessage ) . toContain ( '--stdin-filepath <path>' ) ;
149- expect ( fmtHelpMessage ) . toContain ( '-h, --help' ) ;
142+ const helpMessage = stripVTControlCharacters ( fmtHelpMessage ) ;
143+
144+ expect ( helpMessage ) . toContain ( 'Usage:\n $ rs fmt [options] [files/globs...]' ) ;
145+ expect ( helpMessage ) . toContain ( `Options:
146+ --write Write formatted files in place (default)
147+ --check Check whether files are formatted
148+ --list-different Print paths of unformatted files
149+ --ignore-path <path> Path to an additional ignore file (repeatable)
150+ --parallel-workers <count> Number of parallel workers
151+ --stdin-filepath <path> Format stdin as if it were saved at <path>
152+ -h, --help Display this help message` ) ;
150153} ) ;
151154
152155test . each ( [
You can’t perform that action at this time.
0 commit comments