Skip to content

Commit d9eb6ed

Browse files
authored
test: disable warning for vm.constants.USE_MAIN_CONTEXT_DEFAULT_LOADER (#21074)
1 parent 253be16 commit d9eb6ed

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎tests/lib/config/config-loader.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,16 @@ describe("Config loaders", () => {
104104

105105
requireWithoutCache.cache = void 0;
106106

107+
// Do not warn about usage of experimental `vm.constants.USE_MAIN_CONTEXT_DEFAULT_LOADER`.
108+
const emitStub = sinon.stub(process, "emit");
109+
emitStub
110+
.withArgs(
111+
"warning",
112+
sinon.match({ name: "ExperimentalWarning" }),
113+
)
114+
.returns();
115+
emitStub.callThrough();
116+
107117
const compiledWrapper = vm.runInThisContext(
108118
Module.wrap(configLoaderSource),
109119
{

0 commit comments

Comments
 (0)