Skip to content

test(async): make debounce tests deterministic#7034

Merged
kt3k merged 1 commit intodenoland:mainfrom
tomas-zijdemans:fix-debounce-test
Mar 7, 2026
Merged

test(async): make debounce tests deterministic#7034
kt3k merged 1 commit intodenoland:mainfrom
tomas-zijdemans:fix-debounce-test

Conversation

@tomas-zijdemans
Copy link
Contributor

Ref: #7022 (comment)

Replace await delay() with synchronous flush()/clear() calls in debounce tests. Real timers can be unreliable in CI, making these tests flaky. Every behaviour under test can be verified deterministically without waiting for timers to fire.

@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.83%. Comparing base (af9b074) to head (cfe17d6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7034   +/-   ##
=======================================
  Coverage   93.83%   93.83%           
=======================================
  Files         624      624           
  Lines       49629    49629           
  Branches     8721     8721           
=======================================
  Hits        46571    46571           
  Misses       2478     2478           
  Partials      580      580           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@kt3k kt3k merged commit 8d3e9c3 into denoland:main Mar 7, 2026
19 checks passed
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.

2 participants