import { hasVisibleChild } from '../utils' ; describe ( 'Profile Tree utils' , ( ) => { describe ( '#hasVisibleChild' , ( ) => { it ( 'base case no children' , ( ) => { const op = { children : [ ] } ; expect ( hasVisibleChild ( op ) ) . toBe ( false ) ; } ) ; it ( 'base case with children' , ( ) => { const op = { children : [ { visible : false } , { visible : false } , { visible : true } ] } ; expect ( hasVisibleChild ( op ) ) . toBe ( true ) ; } ) ; it ( 'is robust' , ( ) => { const op = { } ; expect ( hasVisibleChild ( op ) ) . toBe ( false ) ; } ) ; } ) ; } ) ;