Skip to content

[$250] Clean up logs in unit tests #70676

Closed

Description

@roryabraham

Coming from https://expensify.slack.com/archives/C08CZDJFJ77/p1757410761699449

Proposal: Clean up logs in unit tests

Background

Unit tests often include many logs that can provide insight on what's happening in that test. In JavaScript, console logs are generally divided into four levels:

  • debug
  • info (this is generally the default used by console.log)
  • warn
  • error

If you are running a full test suite, you're likely to be most interested in error logs, because they will be the ones that show you which tests are failing and why. If you're running or debugging an individual test, you're more likely to be interested in all logs.

Problem

When running our jest tests, the large volume of logs across all tests makes it difficult to quickly see which tests failed and why. This prevents us from quickly resolving issues when tests fail on a PR, which in turn can delay the merge and deploy of the PR.

Solution

Silence debug, info, and warn logs by default in our jest tests. This will greatly reduce the volume of logs and make it easier to quickly identify which tests failed and why. Enable developers to see all log levels by passing the --verbose flag to jest; that way we can still dive into more detail in an individual test for debugging purposes.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021983296236419899384
  • Upwork Job ID: 1983296236419899384
  • Last Price Increase: 2025-10-28
Issue OwnerCurrent Issue Owner: @

Activity

  1. mananjadhav commented on Sep 20, 2025

    @mananjadhav
    Collaborator

    PR being reviewed and worked upon.

  2. mananjadhav commented on Sep 27, 2025

    @mananjadhav
    Collaborator

    Left review, waiting for it to be picked up again.

  3. melvin-bot commented on Oct 22, 2025

    @melvin-bot

    This issue has not been updated in over 15 days. @mananjadhav, @elirangoshen eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  4. mananjadhav commented on Oct 26, 2025

    @mananjadhav
    Collaborator

    @roryabraham I had helped with the review of the PR and it's now deployed in production for ~2 weeks. Can you help with the payment summary?

  5. 5 remaining items

  6. melvin-bot commented on Oct 28, 2025

    @melvin-bot
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Oct 28, 2025
  8. melvin-bot commented on Oct 28, 2025

    @melvin-bot

    Current assignee @mananjadhav is eligible for the External assigner, not assigning anyone new.

  9. melvin-bot commented on Oct 28, 2025

    @melvin-bot

    Triggered auto assignment to @RachCHopkins (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  10. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Oct 28, 2025
  11. roryabraham commented on Oct 28, 2025

    @roryabraham
    ContributorAuthor

    @RachCHopkins just a standard $250 C+ review bounty to @mananjadhav

  12. RachCHopkins commented on Oct 31, 2025

    @RachCHopkins
    Contributor

    Payment Summary:

    • Contributor+: @mananjadhav to be paid $250 via NewDot Manual Request

    Upwork job here

  13. RachCHopkins commented on Oct 31, 2025

    @RachCHopkins
    Contributor

    No contributor to pay via upwork, and the Upwork post has been closed.

    🟢 to @mananjadhav to request payment.

  14. quinthar commented on Nov 2, 2025

    @quinthar
    Contributor

    $250 approved to @mananjadhav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorImprovementItem broken or needs improvement.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions