@@ -32,14 +32,14 @@ describe('Graph', () => {
32
32
expect ( graph . getAllVertices ( ) [ 0 ] ) . toEqual ( vertexA ) ;
33
33
expect ( graph . getAllVertices ( ) [ 1 ] ) . toEqual ( vertexB ) ;
34
34
35
- const graphVertexA = graph . findVertexByKey ( vertexA . getKey ( ) ) ;
36
- const graphVertexB = graph . findVertexByKey ( vertexB . getKey ( ) ) ;
35
+ const graphVertexA = graph . getVertexByKey ( vertexA . getKey ( ) ) ;
36
+ const graphVertexB = graph . getVertexByKey ( vertexB . getKey ( ) ) ;
37
37
38
38
expect ( graph . toString ( ) ) . toBe ( 'A,B' ) ;
39
39
expect ( graphVertexA ) . toBeDefined ( ) ;
40
40
expect ( graphVertexB ) . toBeDefined ( ) ;
41
41
42
- expect ( graph . findVertexByKey ( 'not existing' ) ) . toBeNull ( ) ;
42
+ expect ( graph . getVertexByKey ( 'not existing' ) ) . toBeUndefined ( ) ;
43
43
44
44
expect ( graphVertexA . getNeighbors ( ) . length ) . toBe ( 1 ) ;
45
45
expect ( graphVertexA . getNeighbors ( ) [ 0 ] ) . toEqual ( vertexB ) ;
@@ -60,8 +60,8 @@ describe('Graph', () => {
60
60
61
61
graph . addEdge ( edgeAB ) ;
62
62
63
- const graphVertexA = graph . findVertexByKey ( vertexA . getKey ( ) ) ;
64
- const graphVertexB = graph . findVertexByKey ( vertexB . getKey ( ) ) ;
63
+ const graphVertexA = graph . getVertexByKey ( vertexA . getKey ( ) ) ;
64
+ const graphVertexB = graph . getVertexByKey ( vertexB . getKey ( ) ) ;
65
65
66
66
expect ( graph . toString ( ) ) . toBe ( 'A,B' ) ;
67
67
expect ( graphVertexA ) . toBeDefined ( ) ;
0 commit comments