🔧 chore(vitest): mock the ResizeObserver API
used by ParallaxProvider
This commit is contained in:
@@ -13,3 +13,15 @@ afterEach(() => {
|
|||||||
vi.resetAllMocks()
|
vi.resetAllMocks()
|
||||||
cleanup()
|
cleanup()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mocks the ResizeObserver API (used by ParallaxProvider)
|
||||||
|
*/
|
||||||
|
vi.stubGlobal(
|
||||||
|
'ResizeObserver',
|
||||||
|
vi.fn().mockImplementation(() => ({
|
||||||
|
observe: vi.fn(),
|
||||||
|
unobserve: vi.fn(),
|
||||||
|
disconnect: vi.fn(),
|
||||||
|
}))
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user