test: force context allocation in test module

V8's behavior changed in c3bd741efd. Top-level variables
in a module are no longer context-allocated by default.

PR-URL: https://github.com/nodejs/node/pull/18312
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Yang Guo 2018-01-23 10:29:26 +01:00
parent 756a34e863
commit fa33f026cc

View File

@ -7,4 +7,7 @@ while (t > 0) {
console.log(`Outputed message #${k++}`);
}
}
process.exit(55);
process.exit(55);
// test/parallel/test-inspector-esm.js expects t and k to be context-allocated.
(function force_context_allocation() { return t + k; })