Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): refactor the logging logic in e2e tests #15548

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

mandarini
Copy link
Member

@mandarini mandarini commented Mar 8, 2023

  • change ['pipe', 'pipe', 'pipe'] to pipe
  • enhance the way isVerbose() is used
  • change look of output if isVerbose()
  • make sure error is always caught and logged
  • remove unnecessary .toString() since we're using encoding to all execSync commands
  • add optional chaining where needed

Comments

Output, if error, is always displayed.

The thing is, however, that in the test summary, if there was an error, still the stack trace of error on execSync is displayed. We can take a look at whether this is configurable or not at a later PR.

@vercel
Copy link

vercel bot commented Mar 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
nx-dev ⬜️ Ignored (Inspect) Mar 9, 2023 at 4:07PM (UTC)

@mandarini mandarini changed the title Chore/e2e logs refactor fix(core): refactor the logging logic in e2e tests Mar 8, 2023
@mandarini mandarini marked this pull request as ready for review March 8, 2023 20:27
@mandarini mandarini self-assigned this Mar 8, 2023
@mandarini mandarini enabled auto-merge (squash) March 9, 2023 09:36
e2e/utils/get-env-info.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@meeroslav meeroslav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some minor changes.

@mandarini mandarini requested a review from meeroslav March 9, 2023 14:44
Copy link
Contributor

@barbados-clemens barbados-clemens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!
just a place to reuse the stripConsoleColor is the only thing I see in the PR.

e2e/utils/command-utils.ts Outdated Show resolved Hide resolved
@mandarini mandarini merged commit a0e00c8 into nrwl:master Mar 9, 2023
nartc pushed a commit to nartc/nx that referenced this pull request Mar 9, 2023
FrozenPandaz pushed a commit that referenced this pull request Mar 10, 2023
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants