@@ -51,14 +51,14 @@ test.suite('esm', (test) => {
5151 expect ( r . err ) . not . toBe ( null ) ;
5252 // on node 20, this will be a path. prior versions, a file: url
5353 // on windows in node 20, it's a quasi-url like d:/path/to/throw%20error.ts
54- expect ( r . err ! . message ) . toMatch (
54+ expect ( r . err ! . message . replace ( / \r \n / g , '\n' ) ) . toMatch (
5555 / [ \\ \/ ] t h r o w ( | % 2 0 ) e r r o r \. t s : 1 0 0 \n b a r \( \) \{ t h r o w n e w E r r o r \( ' t h i s i s a d e m o ' \) ; \} /
5656 ) ;
5757 // the ^ and number of line-breaks is platform-specific
5858 // also, node 20 puts the type in here when source mapping it, so it
5959 // shows as Foo.Foo.bar
60- expect ( r . err ! . message ) . toMatch ( / ^ a t ( F o o \. ) { 1 , 2 } b a r \( / m) ;
61- expect ( r . err ! . message ) . toMatch ( / ^ a t ( F o o \. ) { 1 , 2 } b a r ( [ ^ \n ] + [ \\ \/ ] t h r o w ( | % 2 0 ) e r r o r \. t s : 1 0 0 : 1 7 ) ` / m) ;
60+ expect ( r . err ! . message . replace ( / \r \n / g , '\n' ) ) . toMatch ( / ^ a t ( F o o \. ) { 1 , 2 } b a r \( / m) ;
61+ expect ( r . err ! . message . replace ( / \r \n / g , '\n' ) ) . toMatch ( / ^ a t ( F o o \. ) { 1 , 2 } b a r ( [ ^ \n \) ] + [ \\ \/ ] t h r o w ( | % 2 0 ) e r r o r \. t s : 1 0 0 : 1 7 ) / m) ;
6262 } ) ;
6363
6464 test . suite ( 'supports experimental-specifier-resolution=node' , ( test ) => {
@@ -96,7 +96,7 @@ test.suite('esm', (test) => {
9696 } ) ;
9797 expect ( r . err ) . not . toBe ( null ) ;
9898 // expect error from node's default resolver, has a few different names in different node versions
99- expect ( r . stderr ) . toMatch (
99+ expect ( r . stderr . replace ( / \r \n / g , '\n' ) ) . toMatch (
100100 / E r r o r \[ E R R _ U N S U P P O R T E D _ E S M _ U R L _ S C H E M E \] : .* (?: \n .* ) { 0 , 10 } \n * a t ( d e f a u l t | n e x t ) ( L o a d | R e s o l v e ) /
101101 ) ;
102102 } ) ;
@@ -106,7 +106,7 @@ test.suite('esm', (test) => {
106106 cwd : join ( TEST_DIR , './esm-import-cache' ) ,
107107 } ) ;
108108 expect ( r . err ) . toBe ( null ) ;
109- expect ( r . stdout ) . toBe ( 'log1\nlog2\nlog2\n' ) ;
109+ expect ( r . stdout . replace ( / \r \n / g , '\n' ) ) . toBe ( 'log1\nlog2\nlog2\n' ) ;
110110 } ) ;
111111
112112 test ( 'should support transpile only mode via dedicated loader entrypoint' , async ( ) => {
0 commit comments