11import React from "react" ;
2- import { render , screen , fireEvent , waitFor } from "@testing-library/react" ;
2+ import { render , fireEvent , waitFor } from "@testing-library/react" ;
33import { act } from "react-dom/test-utils" ;
44import dayjs from "dayjs" ;
55import moment from "jalali-moment" ;
@@ -22,9 +22,13 @@ jest.mock("../../components/EventPopup", () => {
2222 } ;
2323} ) ;
2424
25- jest . mock ( "../../components/CalendarIntro" , ( ) => ( ) => (
26- < div data-testid = "calendar-intro" />
27- ) ) ;
25+ jest . mock ( "../../components/CalendarIntro" , ( ) => {
26+ const MockCalendarIntro = ( ) => < div data-testid = "calendar-intro" /> ;
27+
28+ MockCalendarIntro . displayName = "MockCalendarIntro" ;
29+
30+ return MockCalendarIntro ;
31+ } ) ;
2832
2933jest . mock ( "antd" , ( ) => {
3034 const React = require ( "react" ) ;
@@ -45,10 +49,14 @@ jest.mock("antd", () => {
4549 { children }
4650 </ select >
4751 ) ;
48- Select . Option = ( { value, children } ) => (
52+ const SelectOption = ( { value, children } ) => (
4953 < option value = { value } > { children } </ option >
5054 ) ;
5155
56+ SelectOption . displayName = "Select.Option" ;
57+
58+ Select . Option = SelectOption ;
59+
5260 const Tag = ( { children, className, color } ) => (
5361 < div className = { className } data-color = { color } >
5462 { children }
0 commit comments