packages/tests/__setup__/ResizeObserver.js
/**
 * Mock the ResizeObserver constructor.
 * @param {Function} callback
 */
Mock the ResizeObserver constructor.
@param {Function} callback
Mock the ResizeObserver constructor . @param { Function } callback
function ResizeObserver(callback) {
  window.addEventListener('resize', () => callback());
  return {
    observe: () => {},
    unobserve: () => {},
    disconnect: () => {},
  };
}
function ResizeObserver ( callback ) { window . addEventListener ( 'resize' , ( ) => callback ( ) ) ; return { observe : ( ) => { } , unobserve : ( ) => { } , disconnect : ( ) => { } , } ; }
Mock the ResizeObserver constructor.
Mock the ResizeObserver constructor .