0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
nodejs/test/message/vm_dont_display_syntax_error.js
cjihrig ff1efa6087 test: use const for all require() calls
PR-URL: https://github.com/nodejs/node/pull/10550
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-01-02 18:28:18 -05:00

22 lines
335 B
JavaScript

'use strict';
require('../common');
const vm = require('vm');
console.error('beginning');
try {
vm.runInThisContext('var 5;', {
filename: 'test.vm',
displayErrors: false
});
} catch (e) {}
console.error('middle');
vm.runInThisContext('var 5;', {
filename: 'test.vm',
displayErrors: false
});
console.error('end');