fix: add resetStatusBar() and fix test state pollution#9
Closed
victor0602 wants to merge 1 commit intoMiniMax-AI:mainfrom
Closed
fix: add resetStatusBar() and fix test state pollution#9victor0602 wants to merge 1 commit intoMiniMax-AI:mainfrom
victor0602 wants to merge 1 commit intoMiniMax-AI:mainfrom
Conversation
src/client/http.ts: - Export resetStatusBar() to reset the module-level statusBarPrinted flag between test runs. Without this, a test that prints the status bar pollutes the state for subsequent tests in the same process. test/: - test/client/http.test.ts: import resetStatusBar(), call it in afterEach, set quiet:true/noColor:true on all configs (was quiet:false/noColor:false). - test/commands/text/chat.test.ts: same resetStatusBar() + afterEach + fix dry-run test config from quiet:false → quiet:true. - test/commands/video/task-get.test.ts: same resetStatusBar() + afterEach. config kept at quiet:false — the command itself has a stdout/json bug when quiet:true that belongs to a separate fix.
This was referenced Apr 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes test flakiness caused by the module-level
statusBarPrintedflag insrc/client/http.ts.Changes
resetStatusBar()function that resetsstatusBarPrintedtofalse. Call this in testafterEachhooks to prevent state from leaking between test files.resetStatusBar(), addafterEachcall, setquiet: trueandnoColor: trueon all configs (wasquiet: false).resetStatusBar()import +afterEach, fix dry-run test configquiet: false → true.resetStatusBar()import +afterEach. Config keptquiet: false— that test exercises a known command bug (stdout/json mixing) that belongs in a separate PR.All 62 tests pass.