Remove ResizeObserver Polyfill (#7844)
This commit is contained in:
parent
29c1c8d1e1
commit
38a547b5d0
6 changed files with 12 additions and 21 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue