Something went wrong. Try again.
Offload functions to worker threads with shared memory primitives for Node.js.
Something went wrong. Try again.
12345678910111213141516171819import { describe, it } from 'node:test';import assert from 'node:assert/strict';import { execFile } from 'node:child_process';import { promisify } from 'node:util';import { fileURLToPath } from 'node:url';import { join } from 'node:path';
const exec = promisify(execFile);const fixturesDir = join(fileURLToPath(import.meta.url), '..', 'fixtures');
describe('pool worker ref behavior', () => { it('pool keeps event loop alive for top-level await', async () => { const { stdout } = await exec(process.execPath, ['--no-warnings', join(fixturesDir, 'pool-ref-main.ts')], { timeout: 15000, }); assert.ok(stdout.includes('DONE')); });});