Add test-worker-stack-overflow.js

This commit is contained in:
Ben Grant
2025-05-19 15:48:04 -07:00
committed by Ciro Spaciari
parent 117c2ab83d
commit b817038551

View File

@@ -0,0 +1,10 @@
'use strict';
const common = require('../common');
const { Worker } = require('worker_threads');
const worker = new Worker('function f() { f(); } f();', { eval: true });
worker.on('error', common.expectsError({
constructor: RangeError,
message: /Maximum call stack size exceeded\.?/
}));