/** * 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(); } ); } ); } ); } ); Virat Kohli vs Gautam Gambhir Fight विराट से बीच मैदान में लिया पंगा अब क्या होगा इस खिलाड़ी का – HOW TO CRIC

Virat Kohli vs Gautam Gambhir Fight विराट से बीच मैदान में लिया पंगा अब क्या होगा इस खिलाड़ी का

बीच मैदान लिया Virat Kohli से पंगा?
अपनी टीम को भी फसाया?
अब क्या होगा इस खिलाड़ी का?

Virat Kohli vs Gautam Gambhir, IPL 2023 में विराट कोहली और गौतम गंभीर आपस में भीड़ गए| दोनों के बीच जमकर बहस हुई| यह बहस इतनी जबरदस्त हुई कि बाकी Players और Empire के बीच बचाव के लिए आना पड़ा| इसके वीडियो और फोटो बहुत तेजी से Social media पर वायरल हो रहे हैं और लगातार अलग-अलग तरीके से इस घटना को बताया जा रहा है|

Royal Challengers Bangalore VS Lucknow Super Giants

IPL 2023 में एक बार फिर विराट कोहली और गौतम गंभीर को आपस में भीड़ते हुए लखनऊ के पूरे स्टेडियम में सबके सामने देखने को मिला| यह सारा विवाद 1 मई सोमवार को रॉयल चैलेंजर्स बेंगलुरु (RCB) और लखनऊ सुपरजाइंट्स (LSG) के बीच पूरे स्टेडियम में सबके सामने देखने को मिला| वहीं रॉयल चैलेंजर्स बेंगलुरु 18 रनों की जीत के साथ जश्न मना रही थी, तो दूसरी तरफ अनुष्का शर्मा इस विवाद को देखकर अपनी हंसी खो बैठी थी|

मैच जीतने के लिए रॉयल चैलेंज बेंगलुरु टीम ने लखनऊ को 127 रनों का Target दिया था| जो अब तक के सबसे कम IPL 2023 का टारगेट में से एक था| लेकिन लखनऊ सुपरजाइंट्स (LSG) की टीम का प्रदर्शन इतना बेकार था, कि वह इस टारगेट को भी पूरा नहीं कर पाई और 18 रनों के साथ अपना Target पूरा करने में नाकाम रही| इस बीच लखनऊ सुपर Giants अपने गिरते लुढ़कते 108 रनों को ही समेट पाई| तभी जब मैच समाप्त हुआ, तब हमें गौतम गंभीर और विराट कोहली के बीच यह घमासान विवाद देखने के लिए मिला| मैच समाप्त होने के बाद जब आपस में हाथ मिला रहे थे|

तभी इसी दौरान विराट कोहली और गौतम गंभीर के बीच किसी बात को लेकर बहस हो गई है| बस इतनी जबरदस्त हुई कि बाकी खिलाड़ियों और एंपायर को बीच-बचाव के लिए आना पड़ा| इसकी वीडियो और फोटो सोशल मीडिया बड़ी तेजी से वायरल हो रही है| लखनऊ टीम के अमित मिश्रा और बेंगलुरु टीम के कप्तान फाफ डु प्लेसिस भी बीच बचाव के लिए स्टेडियम में आना पड़ा|

विराट कोहली और गंभीर के बीच IPL 2013 सीजन में भी एक बार जमकर विवाद देखने के लिए मिला था| तब गौतम गंभीर कोलकाता नाइट राइडर्स के कप्तान थे| लेकिन इस बार वे लखनऊ टीम के एक खिलाड़ी हैं| जबकि कोहली बेंगलुरु टीम के पूर्व कप्तान रहे हैं| इस दौरान हमें यह विवाद देखने के लिए मिला था| फिर तो बड़ी तेजी से social media पर वायरल हो रहा है

rcb vs lsg 2023,naveen ul haq
RCB,naveen-ul-haq,KL Rahul,Gautam Gambhir,lsg vs rcb 2023
LSG,rcb match,Royal Challengers Bangalore,rcb बनाम lsg,kohli vs gambhir,rcb vs lucknow,rcb vs Kohli,rcb lsg,kl rahul news,rcb vs lsg live score,Gambhir,virat vs gambhir

READ MORE :-

LSG vs PBKS Match Review IPL 2023

Leave a Comment

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

Scroll to Top