mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Add test-worker-stack-overflow.js
This commit is contained in:
10
test/js/node/test/parallel/test-worker-stack-overflow.js
Normal file
10
test/js/node/test/parallel/test-worker-stack-overflow.js
Normal 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\.?/
|
||||
}));
|
||||
Reference in New Issue
Block a user