mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #5083] [CLOSED] test(frontend): mock axios globally to prevent flaky network errors on CI #5771
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#5771
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/5083
Author: @rqzbeh
Created: 6/8/2026
Status: ❌ Closed
Base:
main← Head:fix/test-network-errors📝 Commits (1)
d6d5b79test(frontend): mock axios globally to prevent flaky network errors on CI📊 Changes
1 file changed (+9 additions, -0 deletions)
View changed files
📝
frontend/src/test/setup.components.ts(+9 -0)📄 Description
This mocks axios globally in the component test setup to prevent 'AxiosError: Network Error' and 'window is not defined' unhandled exceptions caused by delayed network rejections during test teardown. Tests now complete strictly synchronously before JSDOM destroys the window.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.