test: add test for async disposable worker thread

PR-URL: https://github.com/nodejs/node/pull/58385
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This commit is contained in:
James M Snell 2025-05-24 14:04:04 -07:00
parent 34c149aa43
commit d968227050

View File

@ -0,0 +1,8 @@
import * as common from '../common/index.mjs';
import { Worker } from 'node:worker_threads';
{
// Verifies that the worker is async disposable
await using worker = new Worker('for(;;) {}', { eval: true });
worker.on('exit', common.mustCall());
}