import { setMockValues } from '../../../__mocks__/kea_logic' ; import React from 'react' ; import { shallow } from 'enzyme' ; import { EuiCallOut } from '@elastic/eui' ; import { TrialCallout } from './' ; describe ( 'TrialCallout' , ( ) => { it ( 'renders when non-platinum or on trial' , ( ) => { setMockValues ( { isTrial : true } ) ; const wrapper = shallow ( < TrialCallout />); expect ( wrapper . find ( EuiCallOut ) ) . toHaveLength ( 1 ) ; } ) ; it ( 'does not render when not on trial' , ( ) => { setMockValues ( { isTrial : false } ) ; const wrapper = shallow ( < TrialCallout />); expect ( wrapper . find ( EuiCallOut ) ) . toHaveLength ( 0 ) ; } ) ; } ) ;