import React from 'react' ; import { ErrorCountSummaryItemBadge } from './error_count_summary_item_badge' ; import { expectTextsInDocument , renderWithTheme , } from '../../../utils/testHelpers' ; describe ( 'ErrorCountSummaryItemBadge' , ( ) => { it ( 'shows singular error message' , ( ) => { const component = renderWithTheme ( < ErrorCountSummaryItemBadge count = { 1 } / > ) ; expectTextsInDocument ( component , [ '1 Error' ] ) ; } ) ; it ( 'shows plural error message' , ( ) => { const component = renderWithTheme ( < ErrorCountSummaryItemBadge count = { 2 } / > ) ; expectTextsInDocument ( component , [ '2 Errors' ] ) ; } ) ; } ) ;