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:
Leko committed 2017-11-28 23:13:38 +09:00
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);