Skip to content

Commit

Permalink
fix: ignore ExperimentalWarning on esm module
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Sep 16, 2023
1 parent ec9ebc4 commit 47e4c47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/middleware/global_options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
1 change: 1 addition & 0 deletions test/cmd/test.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down

0 comments on commit 47e4c47

Please sign in to comment.