Skip to content

test(cli): reduce the flakiness of Spinner test cases - #4844

Merged
kt3k merged 1 commit into
denoland:mainfrom
kt3k:reduce-flakiness-of-spinner-test
May 23, 2024
Merged

kt3k merged 1 commit into
denoland:mainfrom
kt3k:reduce-flakiness-of-spinner-test

Conversation

@kt3k

@kt3k kt3k commented May 23, 2024

Copy link
Copy Markdown
Contributor

closes #4775

@github-actions github-actions Bot added the cli label May 23, 2024
@codecov

codecov Bot commented May 23, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.97%. Comparing base (83991c7) to head (00eb0d4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4844   +/-   ##
=======================================
  Coverage   91.97%   91.97%           
=======================================
  Files         487      487           
  Lines       41539    41539           
  Branches     5365     5365           
=======================================
  Hits        38207    38207           
  Misses       3274     3274           
  Partials       58       58           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread cli/spinner_test.ts
`${LINE_CLEAR}\u001b[32m⠹${COLOR_RESET} `; // Green

assertStringIncludes(text, expectedStr);
assertStringIncludes(text, `${LINE_CLEAR}\u001b[30m⠋${COLOR_RESET} `); // includes black spinner

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could use black() from std/fmt/colors, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point, but it looks like std/fmt/colors and std/cli/spinner use different codes (0 vs 39) for resetting the colors. I'm not sure it's fine to align them. Leaving this as is for now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's strange. Can we create an issue for that so we can investigate further?

@iuioiua iuioiua changed the title test(cli): reduce the flakiness of the test cases test(cli): reduce the flakiness of Spinner test cases May 23, 2024
@kt3k
kt3k merged commit 57280ae into denoland:main May 23, 2024
@kt3k
kt3k deleted the reduce-flakiness-of-spinner-test branch May 23, 2024 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Spinner constructor accepts interval test is flaky

2 participants