mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 23:50:08 +00:00
test: use vi.stubGlobal for global fetch mock
Replace direct global.fetch assignment with vi.stubGlobal for better control and consistency in test setup
This commit is contained in:
@@ -11,7 +11,7 @@ vi.mock('@/scripts/api', () => ({
|
||||
}
|
||||
}))
|
||||
|
||||
global.fetch = vi.fn()
|
||||
vi.stubGlobal('fetch', vi.fn())
|
||||
|
||||
describe('refreshRemoteConfig', () => {
|
||||
const mockConfig = { feature1: true, feature2: 'value' }
|
||||
|
||||
Reference in New Issue
Block a user