import React from 'react' ; import { mount } from 'enzyme' ; import { RoundedBadge } from './rounded_badge' ; describe ( 'RoundedBadge' , ( ) => { test ( 'it renders "and" when "type" is "and"' , ( ) => { const wrapper = mount ( < RoundedBadge type = "and" / > ) ; expect ( wrapper . find ( '[data-test-subj="and-or-badge"]' ) . at ( 0 ) . text ( ) ) . toEqual ( 'AND' ) ; } ) ; test ( 'it renders "or" when "type" is "or"' , ( ) => { const wrapper = mount ( < RoundedBadge type = "or" / > ) ; expect ( wrapper . find ( '[data-test-subj="and-or-badge"]' ) . at ( 0 ) . text ( ) ) . toEqual ( 'OR' ) ; } ) ; } ) ;