summaryrefslogtreecommitdiff
path: root/test/parallel/test-worker-stack-overflow.js
blob: 32351b7a4a6fad1c47ae93c38adb1fc7a14c6124 (plain)
1
2
3
4
5
6
7
8
9
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'
}));