You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(test): Make TerminalProcess integration test reliable
This commit fixes the flaky test case `integrates with getUnretrievedOutput to handle progress bars` in `TerminalProcess.test.ts`.
The test previously failed intermittently due to:
1. Relying on a fixed `setTimeout` duration to wait for asynchronous stream processing, which created a race condition.
2. Incorrectly assuming that `await terminalProcess.run(...)` would return the final output directly via its resolved value.
The fix addresses these issues by:
- Removing the unreliable intermediate check based on `setTimeout`.
- Modifying the test to correctly obtain the final output by listening for the `completed` event emitted by `TerminalProcess`, which is the intended way to receive the result.
This ensures the test accurately reflects the behavior of `TerminalProcess` and is no longer prone to timing-related failures.
0 commit comments