Skip to content

"Shared Resources" prevents child processes from printing to stdout #3

@wellwelwel

Description

@wellwelwel

Originally opened by @Lojhan in wellwelwel/poku#1014.

When running the test suite with --sharedResources, the immediate output from the spawned child processes is suppressed.

Reproduction:

run any test with console.log with/ without --sharedResources

test('should stdout console.log', () => {
  console.log('This is a console.log from setter-a.test.ts');
});

The most straightforward/naive solution involves adding a console.log directly to the stdout function within the parent process. But surelly there's a better way to do this.

const stdOut = (data: Buffer): void => {
  output += String(data);
  if (GLOBAL.configs.sharedResources) {
    console.log(String(data));
  }
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions