File tree Expand file tree Collapse file tree
libraries/rush-lib/src/logic/test Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ describe(ChangeFiles.name, () => {
3434 expect (
3535 terminalProvider
3636 . getAllOutputAsChunks ( { asLines : true } )
37- . map ( ( chunk ) => chunk . replace ( FORWARD_SLASH_DIRNAME , '<TEST DIR>' ) )
37+ . map ( ( chunk ) => Path . convertToSlashes ( chunk ) . replace ( FORWARD_SLASH_DIRNAME , '<TEST DIR>' ) )
3838 ) . toMatchSnapshot ( ) ;
3939 } ) ;
4040
@@ -176,7 +176,10 @@ describe(ChangeFiles.name, () => {
176176 } ) ;
177177 fail ( 'Expected validateAsync to throw' ) ;
178178 } catch ( error ) {
179- const normalizedMessage : string = error . message . replace ( FORWARD_SLASH_DIRNAME , '<TEST DIR>' ) ;
179+ const normalizedMessage : string = Path . convertToSlashes ( error . message ) . replace (
180+ FORWARD_SLASH_DIRNAME ,
181+ '<TEST DIR>'
182+ ) ;
180183 expect ( normalizedMessage ) . toMatchSnapshot ( ) ;
181184 }
182185 } ) ;
@@ -204,7 +207,10 @@ describe(ChangeFiles.name, () => {
204207 } ) ;
205208 fail ( 'Expected validateAsync to throw' ) ;
206209 } catch ( error ) {
207- const normalizedMessage : string = error . message . replace ( FORWARD_SLASH_DIRNAME , '<TEST DIR>' ) ;
210+ const normalizedMessage : string = Path . convertToSlashes ( error . message ) . replace (
211+ FORWARD_SLASH_DIRNAME ,
212+ '<TEST DIR>'
213+ ) ;
208214 expect ( normalizedMessage ) . toMatchSnapshot ( ) ;
209215 }
210216 } ) ;
You can’t perform that action at this time.
0 commit comments