nodejs-mozilla/test/parallel/test-vm-script-throw-in-tos...

15 lines
204 B
JavaScript
Raw Normal View History

2022-07-18 11:52:00 +08:00
'use strict';
require('../common');
const assert = require('assert');
const vm = require('vm');
assert.throws(() => {
new vm.Script({
toString() {
throw new Error();
}
});
}, Error);