@@ -52,10 +52,13 @@ describeESM("usage from cjs", () => {
5252 } ) ;
5353
5454 it ( "eager plugin required" , async ( ) => {
55- await expect ( run ( "eager-plugin-required.cjs" ) ) . rejects . toThrow (
56- "The `types` export of @babel/core is only accessible from" +
57- " the CommonJS version after that the ESM version is loaded." ,
58- ) ;
55+ expect ( await run ( "eager-plugin-required.cjs" ) ) . toMatchInlineSnapshot ( `
56+ Object {
57+ "stderr": "",
58+ "stdout": "\\"Replaced!\\";
59+ ",
60+ }
61+ ` ) ;
5962 } ) ;
6063
6164 it ( "eager plugin required after dynamic esm import" , async ( ) => {
@@ -91,10 +94,13 @@ describeESM("usage from cjs", () => {
9194 } ) ;
9295
9396 it ( "transformSync" , async ( ) => {
94- await expect ( run ( "transform-sync.cjs" ) ) . rejects . toThrow (
95- "The `transformSync` export of @babel/core is only callable from" +
96- " the CommonJS version after that the ESM version is loaded." ,
97- ) ;
97+ expect ( await run ( "transform-sync.cjs" ) ) . toMatchInlineSnapshot ( `
98+ Object {
99+ "stderr": "",
100+ "stdout": "REPLACE_ME;
101+ ",
102+ }
103+ ` ) ;
98104 } ) ;
99105
100106 it ( "transformSync after dynamic esm import" , async ( ) => {
@@ -141,9 +147,9 @@ describeESM("sync loading of ESM plugins", () => {
141147 "--experimental-require-module" ,
142148 ) ;
143149 expect ( stdout ) . toMatchInlineSnapshot ( `
144- "\\"Replaced!\\";
145- "
146- ` ) ;
150+ "\\"Replaced!\\";
151+ "
152+ ` ) ;
147153 } ) ;
148154
149155 it ( "top-level await" , async ( ) => {
@@ -169,9 +175,9 @@ describeESM("sync loading of ESM plugins", () => {
169175 "--experimental-require-module" ,
170176 ) ;
171177 expect ( stdout ) . toMatchInlineSnapshot ( `
172- "\\"Replaced!\\";
173- "
174- ` ) ;
178+ "\\"Replaced!\\";
179+ "
180+ ` ) ;
175181 } ) ;
176182
177183 it ( "top-level await with --experimental-require-module flag" , async ( ) => {
0 commit comments