source: trip-planner-front/node_modules/piscina/test/console-log.ts@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 531 bytes
Line 
1import concat from 'concat-stream';
2import { spawn } from 'child_process';
3import { resolve } from 'path';
4import { test } from 'tap';
5
6test('console.log() calls are not blocked by Atomics.wait()', async ({ equal }) => {
7 const proc = spawn(process.execPath, [
8 ...process.execArgv, resolve(__dirname, 'fixtures/console-log.ts')
9 ], {
10 stdio: ['inherit', 'pipe', 'inherit']
11 });
12
13 const data = await new Promise((resolve) => {
14 proc.stdout.setEncoding('utf8').pipe(concat(resolve));
15 });
16 equal(data, 'A\nB\n');
17});
Note: See TracBrowser for help on using the repository browser.