/**
 * # Jest Mocks
 *
 * Some components use APIs that are not available in jest, making them
 * difficult to test. This file is a place to implement mock versions of the
 * components.
 *
 * ## Usage Example:
 *
 * In your jest setup file:
 * ```js
 * jest.mock(
 *   "@convertkit/design/popover",
 *   () => require("@convertkit/design/jest-mocks").Popover
 * )
 *```
 */
 import DatePickerInput from "./date-picker-input-mock"
 import Popover from "./popover-mock"
 
 export { DatePickerInput, Popover }
 
 jest.mock(
   "@convertkit/design/popover",
   // eslint-disable-next-line no-undef
   () => require("@convertkit/design/jest-mocks").Popover
 )
 
 // eslint-disable-next-line no-undef
 if (global.document) {
   // create range mock
   document.createRange = () => ({
     setStart: () => {},
     setEnd: () => {},
     commonAncestorContainer: {
       nodeName: "BODY",
       ownerDocument: document,
     },
   })
 }
