Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit af6de19

Browse filesBrowse files
committed
Add test case for parent update
1 parent 6823897 commit af6de19
Copy full SHA for af6de19

1 file changed

+7Lines changed: 7 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/graphs/searching/bfs.spec.js‎

Copy file name to clipboardExpand all lines: test/graphs/searching/bfs.spec.js
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,11 @@ describe('BFS', function () {
3434
expect(bfs(graph, 0, 2)).toBeFalsy();
3535
});
3636

37+
it('should not update the parent node once set', function () {
38+
var graph = [[0, 1, 1],
39+
[0, 0, 1],
40+
[0, 0, 0]];
41+
expect(bfs(graph, 0, 2)).toEqual([0, 2]);
42+
});
43+
3744
});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.