import * as React from 'react' ; import { ShallowWrapper } from 'enzyme' ; export default class TestComponentPropUtils { /**
     * An object of basic React props that can be destructured and applied to a component for testing purposes.
     */ static basicReactProps = { id : 'myId' , className : 'myClass' , style : { cursor : 'pointer' } } ; param shallowWrapper param usesContainer param useChildIndex static expectsBasicReactProps = ( shallowWrapper , usesContainer , useChildIndex = 0 ) => { if ( usesContainer ) { shallowWrapper = shallowWrapper . children ( ) . at ( useChildIndex ) ; } expect ( shallowWrapper . props ( ) . id ) . toBe ( 'myId' ) ; expect ( shallowWrapper . props ( ) . style . cursor ) . toBe ( 'pointer' ) ; expect ( shallowWrapper . props ( ) . className ) . toContain ( 'myClass' ) ; } ; }