diff --git a/src/middleware/global_options.ts b/src/middleware/global_options.ts index ed6259a..5701421 100644 --- a/src/middleware/global_options.ts +++ b/src/middleware/global_options.ts @@ -112,6 +112,8 @@ export default class implements ApplicationLifecycle { // https://nodejs.org/api/url.html#url_url_pathtofileurl_path esmLoader = pathToFileURL(esmLoader).href; } + // wait for https://github.com/nodejs/node/issues/40940 + addNodeOptionsToEnv('--no-warnings', ctx.env); addNodeOptionsToEnv(`--loader ${esmLoader}`, ctx.env); } diff --git a/test/cmd/test.test.ts b/test/cmd/test.test.ts index f282ddc..ceabf4b 100644 --- a/test/cmd/test.test.ts +++ b/test/cmd/test.test.ts @@ -176,6 +176,7 @@ describe('test/cmd/test.test.ts', () => { .debug() .expect('stdout', /should work/) .expect('stdout', /2 passing/) + .notExpect('stderr', /ExperimentalWarning/) .expect('code', 0) .end(); });