import { ReactTestInstance } from "react-test-renderer" ; import findParentWithType from "./findParentWithType" ; export default function findParentsWithType ( instances , selector = "*" ) { return instances . map ( ( i ) => findParentWithType ( i , selector ) ) . filter ( ( i ) => i ) as ReactTestInstance [ ] ; }