mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 23:42:03 +00:00
fix memory leak in test
This commit is contained in:
parent
438ae0bc0f
commit
b09a745bc9
1 changed files with 5 additions and 0 deletions
|
|
@ -142,6 +142,9 @@ describe('AppContainer State Management', () => {
|
|||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
|
||||
// Increase max listeners to prevent EventEmitter memory leak warnings in tests
|
||||
process.setMaxListeners(20);
|
||||
|
||||
// Initialize mock stdout for terminal title tests
|
||||
mockStdout = { write: vi.fn() };
|
||||
|
||||
|
|
@ -305,6 +308,8 @@ describe('AppContainer State Management', () => {
|
|||
|
||||
afterEach(() => {
|
||||
cleanup();
|
||||
// Reset max listeners to default
|
||||
process.setMaxListeners(10);
|
||||
});
|
||||
|
||||
describe('Basic Rendering', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue