xref: /third_party/node/test/parallel/test-worker-nested-uncaught.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ciconst common = require('../common');
31cb0ef41Sopenharmony_ciconst { Worker } = require('worker_threads');
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ci// Regression test for https://github.com/nodejs/node/issues/34309
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_ciconst w = new Worker(
81cb0ef41Sopenharmony_ci  `const { Worker } = require('worker_threads');
91cb0ef41Sopenharmony_ci  new Worker("throw new Error('uncaught')", { eval:true })`,
101cb0ef41Sopenharmony_ci  { eval: true });
111cb0ef41Sopenharmony_ciw.on('error', common.expectsError({
121cb0ef41Sopenharmony_ci  name: 'Error',
131cb0ef41Sopenharmony_ci  message: 'uncaught'
141cb0ef41Sopenharmony_ci}));
15

Indexes created Thu Nov 07 10:32:03 CST 2024