isolated-vm
Advanced tools
Comparing version 3.1.0 to 3.1.1
{ | ||
"name": "isolated-vm", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Access to multiple isolates", | ||
@@ -5,0 +5,0 @@ "main": "isolated-vm.js", |
@@ -35,3 +35,3 @@ 'use strict'; | ||
(async function() { | ||
let script = await isolate.compileScript('fnPromise.applySyncPromise(undefined, [])'); | ||
let script = await isolate.compileScript('fnPromise.applySyncPromise(undefined, [], {})'); | ||
let value = await script.run(context); | ||
@@ -38,0 +38,0 @@ if (/hello123/.test(value)) { |
@@ -37,5 +37,6 @@ const ivm = require('isolated-vm'); | ||
const delegatedPromise = context.evalClosureSync( | ||
`return $0.apply(undefined, [], { result: { promise: true }})`, | ||
[ () => new Promise(resolve => process.nextTick(resolve)) ], { arguments: { reference: true }, result: { promise: true } }); | ||
delegatedPromise.result.then(resolved); | ||
`return $0.apply(undefined, [], { result: { promise: true, copy: true }})`, | ||
[ () => new Promise(resolve => process.nextTick(() => resolve(value))) ], | ||
{ arguments: { reference: true }, result: { promise: true, copy: true } }); | ||
delegatedPromise.result.then(resolved => assert.deepEqual(resolved, value)).then(resolved); | ||
@@ -42,0 +43,0 @@ let ii = 0; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
467792
143
2441