Skip to content

Commit

Permalink
test: add test case that crashes when throwing an exception with vm.S…
Browse files Browse the repository at this point in the history
…cript

It failed with `FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal`.
  • Loading branch information
Leko committed Nov 28, 2017
1 parent 60f4711 commit 19a1b2e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/parallel/test-vm-script-throw-in-tostring.js
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 19a1b2e

Please sign in to comment.