8000 catch stdout and errors and group them with file output · Issue #4 · mhweiner/kizu · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
catch stdout and errors and group them with file output #4
Open
@mhweiner

Description

@mhweiner

Errors within tests are already caught and buffered, but errors outside of the tests (that make their way to the process itself) are not caught and buffered. It's currently piped directly parent.

In order to do this, you will need do the following:

  • filesWithTestResults needs to include files without tests, since those tests might have output and wouldn't be included for display
  • pass silent: true in options to fork()
  • the following:
worker.stdout?.setEncoding('utf8');
worker.stdout?.on('data', (data) => (stdoutBuffer[file] = (stdoutBuffer[file] || '') + data.toString()));
worker.stderr?.setEncoding('utf8');
worker.stderr?.on('data', (data) => (stdoutBuffer[file] = (stdoutBuffer[file] || '') + data.toString()));

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0