You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03:00
Remove ResizeObserver Polyfill (#7844)
This commit is contained in:
committed by
GitHub
parent
29c1c8d1e1
commit
38a547b5d0
@ -13,6 +13,14 @@ require('jest-fetch-mock').enableMocks();
|
||||
// polyfill until setImmediate use in client can be removed
|
||||
global.setImmediate = callback => setTimeout(callback, 0);
|
||||
|
||||
// Stub ResizeObserver
|
||||
class ResizeObserver {
|
||||
observe() {} // do nothing
|
||||
unobserve() {} // do nothing
|
||||
disconnect() {} // do nothing
|
||||
}
|
||||
window.ResizeObserver = ResizeObserver;
|
||||
|
||||
// polyfilling TextEncoder as it is not available on JSDOM
|
||||
// view https://github.com/facebook/jest/issues/9983
|
||||
global.TextEncoder = TextEncoder;
|
||||
|
Reference in New Issue
Block a user