import Graph from '../src/iterator' ; test ( 'iterator.ts -> Graph' , ( ) => { const graph = new Graph < number > ( ) ; const vertices = [ 1 , 2 , 3 , 4 , 5 ] ; vertices . forEach ( ( vertex ) => graph . addVertex ( vertex ) ) ; vertices . forEach ( ( vertexA ) => { vertices . forEach ( ( vertexB ) => graph . addEdge ( vertexA , vertexB ) ) ; } ) ; expect ( [ ... graph ] . length ) . toEqual ( 5 ) ; } ) ;