From fa33f026cc2ce1bc1bb0e70399d8baaf794616f5 Mon Sep 17 00:00:00 2001 From: Yang Guo Date: Tue, 23 Jan 2018 10:29:26 +0100 Subject: [PATCH] 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 Reviewed-By: James M Snell --- test/fixtures/es-modules/loop.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/fixtures/es-modules/loop.mjs b/test/fixtures/es-modules/loop.mjs index 33a382bdde7dab..edd111abb9e9b7 100644 --- a/test/fixtures/es-modules/loop.mjs +++ b/test/fixtures/es-modules/loop.mjs @@ -7,4 +7,7 @@ while (t > 0) { console.log(`Outputed message #${k++}`); } } -process.exit(55); \ No newline at end of file +process.exit(55); + +// test/parallel/test-inspector-esm.js expects t and k to be context-allocated. +(function force_context_allocation() { return t + k; })