summaryrefslogtreecommitdiff
path: root/test/parallel/test-vm-cached-data.js
diff options
context:
space:
mode:
authorMyles Borins <mborins@us.ibm.com>2016-04-20 16:09:04 -0700
committerMyles Borins <mborins@us.ibm.com>2016-05-11 12:07:24 -0700
commit9460b2038c408d5c2e052a32fde340edb40e3486 (patch)
treee4ebea3db6cbe80ded6f41ad9490a22df9223465 /test/parallel/test-vm-cached-data.js
parent41a063f0675c923a0d1a41f087b4adf62eb8fdf2 (diff)
downloadnode-new-9460b2038c408d5c2e052a32fde340edb40e3486.tar.gz
test: fix test-vm-cached-data to work with old v8
While `let` no longer needs to run in `strict mode` in v8 5.x it throws in v8 4. This modification will make the test-vm-cached-data work in older version of node. Refs: https://github.com/nodejs/node/pull/6280 PR-URL: https://github.com/nodejs/node/pull/6317 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com>
Diffstat (limited to 'test/parallel/test-vm-cached-data.js')
-rw-r--r--test/parallel/test-vm-cached-data.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-vm-cached-data.js b/test/parallel/test-vm-cached-data.js
index 2ad1abe0d8..d80c1306cb 100644
--- a/test/parallel/test-vm-cached-data.js
+++ b/test/parallel/test-vm-cached-data.js
@@ -14,10 +14,11 @@ function produce(source, count) {
count = 1;
const out = spawnSync(process.execPath, [ '-e', `
+ 'use strict';
var assert = require('assert');
var vm = require('vm');
- let data;
+ var data;
for (var i = 0; i < ${count}; i++) {
var script = new vm.Script(process.argv[1], {
produceCachedData: true