test: add mock for ResizeObserver to support unit tests
This commit is contained in:
parent
6f765521e6
commit
c8d0f30e79
1 changed files with 8 additions and 0 deletions
|
|
@ -1,2 +1,10 @@
|
||||||
// Learn more: https://github.com/testing-library/jest-dom
|
// Learn more: https://github.com/testing-library/jest-dom
|
||||||
import "@testing-library/jest-dom"
|
import "@testing-library/jest-dom"
|
||||||
|
|
||||||
|
class ResizeObserverMock {
|
||||||
|
observe() {}
|
||||||
|
unobserve() {}
|
||||||
|
disconnect() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
global.ResizeObserver = ResizeObserverMock;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue