@@ -8,7 +8,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
88 describe ( 'string input' , { concurrency : true } , ( ) => {
99 it ( 'permits ESM syntax in --eval input without requiring --input-type=module' , async ( ) => {
1010 const { stdout, stderr, code, signal } = await spawnPromisified ( process . execPath , [
11- '--no-warnings' ,
1211 '--experimental-detect-module' ,
1312 '--eval' ,
1413 'import { version } from "node:process"; console.log(version);' ,
@@ -24,7 +23,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
2423
2524 it ( 'permits ESM syntax in STDIN input without requiring --input-type=module' , async ( ) => {
2625 const child = spawn ( process . execPath , [
27- '--no-warnings' ,
2826 '--experimental-detect-module' ,
2927 ] ) ;
3028 child . stdin . end ( 'console.log(typeof import.meta.resolve)' ) ;
@@ -34,7 +32,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
3432
3533 it ( 'should be overridden by --input-type' , async ( ) => {
3634 const { code, signal, stdout, stderr } = await spawnPromisified ( process . execPath , [
37- '--no-warnings' ,
3835 '--experimental-detect-module' ,
3936 '--input-type=commonjs' ,
4037 '--eval' ,
@@ -49,7 +46,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
4946
5047 it ( 'should be overridden by --experimental-default-type' , async ( ) => {
5148 const { code, signal, stdout, stderr } = await spawnPromisified ( process . execPath , [
52- '--no-warnings' ,
5349 '--experimental-detect-module' ,
5450 '--experimental-default-type=commonjs' ,
5551 '--eval' ,
@@ -64,7 +60,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
6460
6561 it ( 'does not trigger detection via source code `eval()`' , async ( ) => {
6662 const { code, signal, stdout, stderr } = await spawnPromisified ( process . execPath , [
67- '--no-warnings' ,
6863 '--experimental-detect-module' ,
6964 '--eval' ,
7065 'eval("import \'nonexistent\';");' ,
@@ -106,7 +101,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
106101 ] ) {
107102 it ( testName , async ( ) => {
108103 const { stdout, stderr, code, signal } = await spawnPromisified ( process . execPath , [
109- '--no-warnings' ,
110104 '--experimental-detect-module' ,
111105 entryPath ,
112106 ] ) ;
@@ -148,7 +142,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
148142 ] ) {
149143 it ( testName , async ( ) => {
150144 const { stdout, stderr, code, signal } = await spawnPromisified ( process . execPath , [
151- '--no-warnings' ,
152145 '--experimental-detect-module' ,
153146 entryPath ,
154147 ] ) ;
@@ -163,7 +156,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
163156 it ( 'should not hint wrong format in resolve hook' , async ( ) => {
164157 let writeSync ;
165158 const { stdout, stderr, code, signal } = await spawnPromisified ( process . execPath , [
166- '--no-warnings' ,
167159 '--experimental-detect-module' ,
168160 '--no-warnings' ,
169161 '--loader' ,
@@ -202,7 +194,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
202194 ] ) {
203195 it ( testName , async ( ) => {
204196 const { stdout, stderr, code, signal } = await spawnPromisified ( process . execPath , [
205- '--no-warnings' ,
206197 '--experimental-detect-module' ,
207198 entryPath ,
208199 ] ) ;
@@ -232,7 +223,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
232223 ] ) {
233224 it ( testName , async ( ) => {
234225 const { stdout, stderr, code, signal } = await spawnPromisified ( process . execPath , [
235- '--no-warnings' ,
236226 '--experimental-detect-module' ,
237227 entryPath ,
238228 ] ) ;
@@ -249,7 +239,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
249239 describe ( 'syntax that errors in CommonJS but works in ESM' , { concurrency : true } , ( ) => {
250240 it ( 'permits top-level `await`' , async ( ) => {
251241 const { stdout, stderr, code, signal } = await spawnPromisified ( process . execPath , [
252- '--no-warnings' ,
253242 '--experimental-detect-module' ,
254243 '--eval' ,
255244 'await Promise.resolve(); console.log("executed");' ,
@@ -263,7 +252,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
263252
264253 it ( 'permits top-level `await` above import/export syntax' , async ( ) => {
265254 const { stdout, stderr, code, signal } = await spawnPromisified ( process . execPath , [
266- '--no-warnings' ,
267255 '--experimental-detect-module' ,
268256 '--eval' ,
269257 'await Promise.resolve(); import "node:os"; console.log("executed");' ,
@@ -277,7 +265,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
277265
278266 it ( 'still throws on `await` in an ordinary sync function' , async ( ) => {
279267 const { stdout, stderr, code, signal } = await spawnPromisified ( process . execPath , [
280- '--no-warnings' ,
281268 '--experimental-detect-module' ,
282269 '--eval' ,
283270 'function fn() { await Promise.resolve(); } fn();' ,
@@ -291,7 +278,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
291278
292279 it ( 'throws on undefined `require` when top-level `await` triggers ESM parsing' , async ( ) => {
293280 const { stdout, stderr, code, signal } = await spawnPromisified ( process . execPath , [
294- '--no-warnings' ,
295281 '--experimental-detect-module' ,
296282 '--eval' ,
297283 'const fs = require("node:fs"); await Promise.resolve();' ,
@@ -305,7 +291,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
305291
306292 it ( 'permits declaration of CommonJS module variables' , async ( ) => {
307293 const { stdout, stderr, code, signal } = await spawnPromisified ( process . execPath , [
308- '--no-warnings' ,
309294 '--experimental-detect-module' ,
310295 fixtures . path ( 'es-modules/package-without-type/commonjs-wrapper-variables.js' ) ,
311296 ] ) ;
@@ -318,7 +303,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
318303
319304 it ( 'permits declaration of CommonJS module variables above import/export' , async ( ) => {
320305 const { stdout, stderr, code, signal } = await spawnPromisified ( process . execPath , [
321- '--no-warnings' ,
322306 '--experimental-detect-module' ,
323307 '--eval' ,
324308 'const module = 3; import "node:os"; console.log("executed");' ,
@@ -332,7 +316,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => {
332316
333317 it ( 'still throws on double `const` declaration not at the top level' , async ( ) => {
334318 const { stdout, stderr, code, signal } = await spawnPromisified ( process . execPath , [
335- '--no-warnings' ,
336319 '--experimental-detect-module' ,
337320 '--eval' ,
338321 'function fn() { const require = 1; const require = 2; } fn();' ,
0 commit comments