Skip to content

Commit

Permalink
Only set output variable when unset
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Apr 20, 2022
1 parent f263bdd commit 7b1b9c2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/core/test-utils/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,12 @@ export async function runBundles(
// $FlowFixMe[prop-missing]
ctx.sideEffectNoop = () => {};

// The output variable is used to pass results of the tests. Define it so that reassigning
// it doesn't fail in strict mode.
// $FlowFixMe[prop-missing]
ctx.output = undefined;
if (!('output' in ctx)) {
// The output variable is used to pass results of the tests. Define it so that reassigning
// it doesn't fail in strict mode.
// $FlowFixMe[prop-missing]
ctx.output = undefined;
}

vm.createContext(ctx);
let esmOutput;
Expand Down

0 comments on commit 7b1b9c2

Please sign in to comment.