blob: 99a34b5369006fd2d5f6d710ef961d140a07c9ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
'use strict';
const common = require('../common');
const assert = require('assert');
const { Worker } = require('worker_threads');
const worker = new Worker('function f() { f(); } f();', { eval: true });
worker.on('error', common.mustCall((err) => {
assert.strictEqual(err.constructor, RangeError);
assert.strictEqual(err.message, 'Maximum call stack size exceeded');
}));
|