Skip to content

Commit

Permalink
test: fix test-vm-cached-data to work with old v8
Browse files Browse the repository at this point in the history
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: #6280

PR-URL: #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>
  • Loading branch information
Myles Borins authored and evanlucas committed May 17, 2016
1 parent 0eb25cb commit 1b71231
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parallel/test-vm-cached-data.js
Expand Up @@ -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
Expand Down

0 comments on commit 1b71231

Please sign in to comment.