xref: /third_party/node/test/parallel/test-worker-process-exit-async-module.js (revision 1cb0ef41)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ciconst common = require('../common');
41cb0ef41Sopenharmony_ciconst assert = require('assert');
51cb0ef41Sopenharmony_ciconst { Worker } = require('worker_threads');
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_ci// Regression for https://github.com/nodejs/node/issues/43182.
81cb0ef41Sopenharmony_ciconst w = new Worker(new URL('data:text/javascript,process.exit(1);await new Promise(()=>{ process.exit(2); })'));
91cb0ef41Sopenharmony_ciw.on('exit', common.mustCall((code) => {
101cb0ef41Sopenharmony_ci  assert.strictEqual(code, 1);
111cb0ef41Sopenharmony_ci}));
12

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