@@ -51,14 +51,14 @@ test.suite('esm', (test) => {
51
51
expect ( r . err ) . not . toBe ( null ) ;
52
52
// on node 20, this will be a path. prior versions, a file: url
53
53
// 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 (
55
55
/ [ \\ \/ ] 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 ' \) ; \} /
56
56
) ;
57
57
// the ^ and number of line-breaks is platform-specific
58
58
// also, node 20 puts the type in here when source mapping it, so it
59
59
// 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) ;
62
62
} ) ;
63
63
64
64
test . suite ( 'supports experimental-specifier-resolution=node' , ( test ) => {
@@ -96,7 +96,7 @@ test.suite('esm', (test) => {
96
96
} ) ;
97
97
expect ( r . err ) . not . toBe ( null ) ;
98
98
// 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 (
100
100
/ 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 ) /
101
101
) ;
102
102
} ) ;
@@ -106,7 +106,7 @@ test.suite('esm', (test) => {
106
106
cwd : join ( TEST_DIR , './esm-import-cache' ) ,
107
107
} ) ;
108
108
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' ) ;
110
110
} ) ;
111
111
112
112
test ( 'should support transpile only mode via dedicated loader entrypoint' , async ( ) => {
0 commit comments