isolated-vm
Advanced tools
Comparing version 3.3.8 to 3.3.9
{ | ||
"name": "isolated-vm", | ||
"version": "3.3.8", | ||
"version": "3.3.9", | ||
"description": "Access to multiple isolates", | ||
@@ -5,0 +5,0 @@ "main": "isolated-vm.js", |
@@ -17,6 +17,20 @@ const ivm = require('isolated-vm'); | ||
assert.throws(() => | ||
context.evalSync(`Promise.race([ 1, Promise.reject(new Error('hello')) ])`, { promise: true }), | ||
await assert.rejects(() => | ||
context.evalSync(`Promise.reject(new Error('hello'))`, { promise: true }).result, | ||
/hello/); | ||
assert.doesNotThrow(() => | ||
context.evalSync('Promise.reject(new Error(1)).catch(() => {})')); | ||
assert.doesNotThrow(() => context.evalSync(` | ||
(async () => { | ||
try { | ||
await new Promise((_, reject) => reject(new Error('abc'))); | ||
} catch (err) { | ||
// ignore | ||
} | ||
})(); | ||
`)); | ||
try { | ||
@@ -23,0 +37,0 @@ context.evalSync(` |
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
502587
2693