Skip to content

Commit 716a19c

Browse files
committed
test: improve test-vm-context-async-script
1 parent 1556d3b commit 716a19c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/parallel/test-vm-context-async-script.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
'use strict';
23-
require('../common');
23+
const common = require('../common');
2424
const assert = require('assert');
2525
const vm = require('vm');
2626

27-
const sandbox = { setTimeout: setTimeout };
27+
const sandbox = { setTimeout };
2828

2929
const ctx = vm.createContext(sandbox);
3030

3131
vm.runInContext('setTimeout(function() { x = 3; }, 0);', ctx);
32-
setTimeout(function() {
32+
setTimeout(common.mustCall(() => {
3333
assert.strictEqual(sandbox.x, 3);
3434
assert.strictEqual(ctx.x, 3);
35-
}, 1);
35+
}), 1);

0 commit comments

Comments
 (0)