mirror of
https://github.com/nodejs/node.git
synced 2024-11-24 12:10:08 +01:00
5d559f4a74
PR-URL: https://github.com/nodejs/node/pull/41831 Refs: https://eslint.org/docs/rules/no-empty Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
19 lines
369 B
JavaScript
19 lines
369 B
JavaScript
// Flags: --abort-on-uncaught-exception
|
|
'use strict';
|
|
require('../common');
|
|
const vm = require('vm');
|
|
|
|
// Regression test for https://github.com/nodejs/node/issues/13258
|
|
|
|
try {
|
|
new vm.Script({ toString() { throw new Error('foo'); } }, {});
|
|
} catch {
|
|
// Continue regardless of error.
|
|
}
|
|
|
|
try {
|
|
new vm.Script('[', {});
|
|
} catch {
|
|
// Continue regardless of error.
|
|
}
|