/** * External dependencies */ import TestRenderer from 'react-test-renderer'; /** * Internal dependencies */ import withCategory from '../with-category'; import * as mockUtils from '../../components/utils'; import * as mockBaseUtils from '../../base/utils/errors'; jest.mock( '../../components/utils', () => ( { getCategory: jest.fn(), } ) ); jest.mock( '../../base/utils/errors', () => ( { formatError: jest.fn(), } ) ); const mockCategory = { name: 'Clothing' }; const attributes = { categoryId: 1 }; const TestComponent = withCategory( ( props ) => { return (
); } ); const render = () => { return TestRenderer.create( ); }; describe( 'withCategory Component', () => { let renderer; afterEach( () => { mockUtils.getCategory.mockReset(); } ); describe( 'lifecycle events', () => { beforeEach( () => { mockUtils.getCategory.mockImplementation( () => Promise.resolve() ); renderer = render(); } ); it( 'getCategory is called on mount with passed in category id', () => { const { getCategory } = mockUtils; expect( getCategory ).toHaveBeenCalledWith( attributes.categoryId ); expect( getCategory ).toHaveBeenCalledTimes( 1 ); } ); it( 'getCategory is called on component update', () => { const { getCategory } = mockUtils; const newAttributes = { ...attributes, categoryId: 2 }; renderer.update( ); expect( getCategory ).toHaveBeenNthCalledWith( 2, newAttributes.categoryId ); expect( getCategory ).toHaveBeenCalledTimes( 2 ); } ); it( 'getCategory is hooked to the prop', () => { const { getCategory } = mockUtils; const props = renderer.root.findByType( 'div' ).props; props.getCategory(); expect( getCategory ).toHaveBeenCalledTimes( 2 ); } ); } ); describe( 'when the API returns category data', () => { beforeEach( () => { mockUtils.getCategory.mockImplementation( ( categoryId ) => Promise.resolve( { ...mockCategory, id: categoryId } ) ); renderer = render(); } ); it( 'sets the category props', () => { const props = renderer.root.findByType( 'div' ).props; expect( props.error ).toBeNull(); expect( typeof props.getCategory ).toBe( 'function' ); expect( props.isLoading ).toBe( false ); expect( props.category ).toEqual( { ...mockCategory, id: attributes.categoryId, } ); } ); } ); describe( 'when the API returns an error', () => { const error = { message: 'There was an error.' }; const getCategoryPromise = Promise.reject( error ); const formattedError = { message: 'There was an error.', type: 'api' }; beforeEach( () => { mockUtils.getCategory.mockImplementation( () => getCategoryPromise ); mockBaseUtils.formatError.mockImplementation( () => formattedError ); renderer = render(); } ); it( 'sets the error prop', ( done ) => { const { formatError } = mockBaseUtils; getCategoryPromise.catch( () => { const props = renderer.root.findByType( 'div' ).props; expect( formatError ).toHaveBeenCalledWith( error ); expect( formatError ).toHaveBeenCalledTimes( 1 ); expect( props.error ).toEqual( formattedError ); expect( typeof props.getCategory ).toBe( 'function' ); expect( props.isLoading ).toBe( false ); expect( props.category ).toBeNull(); done(); } ); } ); } ); } ); IPL 2023 MI vs PBKS: मुंबई इंडियंस के फैंस ने किया यह कारनामा फैंस ने किये दो अनोखे रेकॉर्ड अपने नाम – HOW TO CRIC

IPL 2023 MI vs PBKS: मुंबई इंडियंस के फैंस ने किया यह कारनामा फैंस ने किये दो अनोखे रेकॉर्ड अपने नाम

IPL 2023 मुंबई इंडियंस और पंजाब किंग्स का मैच 22 अप्रैल को अगला मुकाबला वानखेड़े स्टेडियम में खेला जाएगा, तो तैयार हो जाइए मुंबई इंडियंस (MI) vs पंजाब किंग्स (PBKS) के मुकाबले के लिए

इंडियन प्रीमियर लीग (IPL) फ्रेंचाइजी मुंबई इंडियंस (MI) का बहुत बड़ा फैन है और उन्ही प्रशंसकों में से एक फैन ने इस सीजन में टीम के लिए एक ऐसा कारनामा करके दिखाया| जो हर किसी को हैरान कर देगा और इस समय सबसे बड़ी Headlines में से एक है| आपको बता दें मुंबई इंडियंस आईपीएल का सबसे सफल फ्रेंचाइजी है| जिन्होंने अब तक पांच खिताब अपने नाम किए हैं| हालांकि रोहित शर्मा की अगुवाई वाली पलटन के लिए पिछला सीजन निराशाजनक बेशक रहा हो| लेकिन मुंबई इंडियंस IPL 2023 में जीत की पटरी पर लौट आई है

मुंबई इंडियंस के फैंस ने किया यह कारनामा

मुंबई इंडियंस (MI) ने इस सीजन में अपने पहले दो मैच गंवाने के बाद लगातार तीन मैच में जीत हासिल की है| इस बीच मुंबई इंडियंस के एक फ्रेंड ऋषि पोपावाला ने जारी IPL 2023 के दौरान अपनी पसंदीदा टीम के लिए अपना सपोर्ट दिखाने के लिए वह सारी सीमाओं को लांघ कर, एक ऐसे एवरेस्ट पर जा पहुंचा, वहां से Mumbai Indians का झंडा फहराने लगा| उस फैंस के प्रति मुंबई इंडियंस का जो प्यार है| वह बहुत अनोखा था

मुंबई इंडियंस के Fans ने फ्रेंचाइजी के इस झंडे को स्विट्जरलैंड के जुंगफ्राउजोच पर्वत पर पहुँचा कर इतिहास रच दिया है| जिसे यूरोप के शीर्ष के रूप में जाना जाता है| यह हाईएस्ट पॉइंट है| जिस पर मुंबई इंडियंस (MI) का झंडा फहराया गया और यह कारनामा ऋषि पोपावाला वाले ने किया है| ऋषि पोपावाला ने ट्विटर पर मुंबई इंडियंस के झंडे के साथ अपनी तीन तस्वीर शेयर करते हुए इस खबर को दुनिया के सामने लेकर आया| ऋषि पोपावाला ने ट्विटर पर अपनी कुछ तस्वीर शेयर करते हुए कैप्शन में लिखा कि मैंने आज आधिकारिक तौर पर दो रिकॉर्ड बनाए हैं:

पहला,

मैं मुंबई इंडियंस के झंडे को स्विट्जरलैंड के साथ-साथ यूरोप माउंट जुंगफ्राउजोच तक ले जाने वाला पहला व्यक्ति बन गया हूं

दूसरा,

यह मुंबई इंडियंस का अब तक का सबसे ऊंचा झंडा है

3 thoughts on “IPL 2023 MI vs PBKS: मुंबई इंडियंस के फैंस ने किया यह कारनामा फैंस ने किये दो अनोखे रेकॉर्ड अपने नाम”

  1. Pingback: MI vs PBKS Dream 11 Team Prediction Today, Fantasy Cricket Tips, Playing 11, Pitch Report, Dream11 Team Captain and Vice Captain And Best winning team of today's match, IPL 2023 - HOW TO CRIC

  2. Pingback: IPL 2023, LSG vs GT Dream 11 Team Prediction Today

  3. Pingback: गुजरात टाइटंस के लिए चौका देने वाली खबर

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top