mirror of
https://github.com/nodejs/node.git
synced 2025-05-05 19:08:17 +00:00

Remove unused vars in tests PR-URL: https://github.com/nodejs/node/pull/4536 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
20 lines
400 B
JavaScript
20 lines
400 B
JavaScript
'use strict';
|
|
require('../common');
|
|
var assert = require('assert');
|
|
var vm = require('vm');
|
|
|
|
assert.throws(function() {
|
|
vm.createContext('string is not supported');
|
|
}, TypeError);
|
|
|
|
assert.doesNotThrow(function() {
|
|
vm.createContext({ a: 1 });
|
|
vm.createContext([0, 1, 2, 3]);
|
|
});
|
|
|
|
assert.doesNotThrow(function() {
|
|
var sandbox = {};
|
|
vm.createContext(sandbox);
|
|
vm.createContext(sandbox);
|
|
});
|