[PR #13253] fix(test): clean up pending Question promises to prevent unhandled rejections #14584

Open
opened 2026-02-16 18:19:22 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13253

State: open
Merged: No


Summary

Fixes CI failure caused by unhandled promise rejections in question tests.

Root cause

question.test.ts created pending Question.ask() promises without .catch() and without disposing the test Instance. Later Instance.disposeAll() rejected those orphaned promises, producing Unhandled error between tests (The user dismissed this question).

Changes

  • Add .catch(() => {}) to pending Question.ask() promises in affected tests
  • Add await Instance.dispose() cleanup in those tests

Validation

  • bun test test/question/question.test.ts test/memory/dispose.test.ts in packages/opencode: 17 pass / 0 fail
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13253 **State:** open **Merged:** No --- ## Summary Fixes CI failure caused by unhandled promise rejections in question tests. ## Root cause `question.test.ts` created pending `Question.ask()` promises without `.catch()` and without disposing the test `Instance`. Later `Instance.disposeAll()` rejected those orphaned promises, producing `Unhandled error between tests` (`The user dismissed this question`). ## Changes - Add `.catch(() => {})` to pending `Question.ask()` promises in affected tests - Add `await Instance.dispose()` cleanup in those tests ## Validation - `bun test test/question/question.test.ts test/memory/dispose.test.ts` in `packages/opencode`: **17 pass / 0 fail**
yindo added the pull-request label 2026-02-16 18:19:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14584