Skip to content

fix: increase bun:test default timeout#852

Merged
emreboga merged 1 commit intomainfrom
emre/fix-test-timeout
Mar 25, 2026
Merged

fix: increase bun:test default timeout#852
emreboga merged 1 commit intomainfrom
emre/fix-test-timeout

Conversation

@emreboga
Copy link
Copy Markdown
Contributor

@emreboga emreboga commented Mar 25, 2026

Every test in this file spawns CLI subprocesses, but only some had the 30s timeout, the rest used Bun's 5s default. We need to fix that by using setDefaultTimeout(SUBPROCESS_TIMEOUT) for the entire file.

Summary by CodeRabbit

  • Tests
    • Streamlined test timeout configuration by implementing a global default timeout, reducing redundant per-test specifications while maintaining consistent test execution.

Signed-off-by: Emre Bogazliyanlioglu <emre@wormholelabs.xyz>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 25, 2026

📝 Walkthrough

Walkthrough

This pull request refactors timeout handling in the CLI help test file by introducing a global default timeout using setDefaultTimeout from bun:test, eliminating the need to pass explicit timeout arguments to individual test cases and the beforeAll hook.

Changes

Cohort / File(s) Summary
Test Timeout Refactoring
cli/src/__tests__/cli-help.test.ts
Centralized timeout configuration by importing and calling setDefaultTimeout(SUBPROCESS_TIMEOUT) globally, then removing individual SUBPROCESS_TIMEOUT arguments from multiple it() test cases and beforeAll() hook while preserving all test logic and assertions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • DBosley
  • douglasgalico

Poem

🐰 Timeouts once scattered like carrots in the ground,
Now gathered in one place, a global timeout found!
No more repetition in each test's refrain,
One setting to rule them—much simpler, quite plain! ⏱️

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: increase bun:test default timeout' is fully related to the main change—applying a global default timeout to address insufficient timeout coverage for CLI subprocess tests.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch emre/fix-test-timeout

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@evan-gray evan-gray left a comment

Choose a reason for hiding this comment

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

worth a shot

@emreboga emreboga merged commit 25a5c3f into main Mar 25, 2026
22 checks passed
@emreboga emreboga deleted the emre/fix-test-timeout branch March 25, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants