mirror of
https://github.com/nodejs/node.git
synced 2026-12-04 21:19:06 -05:00
test: add test case that crashes when throwing an exception with vm.Script
It failed with `FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal`.
This commit is contained in:
1 parent
60f47110fa
commit
19a1b2e414
1 file changed
+14
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
require('../common');
|
||||
const assert = require('assert');
|
||||
|
||||
const vm = require('vm');
|
||||
|
||||
assert.throws(() => {
|
||||
new vm.Script({
|
||||
toString() {
|
||||
throw new Error();
|
||||
}
|
||||
});
|
||||
}, Error);
|
||||
Reference in new issue
Block a user