Skip to content

Commit d32ba08

Browse files
committed
Fixing the first test set for BFS
1 parent b214679 commit d32ba08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/graph-traversal.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ describe('Depth First Search', () => {
157157
expect(DFS).to.be.a('function');
158158
});
159159

160-
it('should return the node with the value of `searchFor` stored in its value property', () => {
160+
it('should return the node with the value of `searchFor` stored in its name property', () => {
161161
expect(DFS(A, "D").value).to.equal("JSON");
162162
expect(DFS(A, "D").name).to.equal("D");
163163
expect(DFS(A, "F").value).to.equal("Nigel");
@@ -198,7 +198,7 @@ describe('Breadth First Search', () => {
198198
});
199199

200200
it('should return the traversal path from the starting point all the way to the end', () => {
201-
expect(BFS(A)).to.deep.equal(["A","B","C","D","F"]);
201+
expect(BFS(A)).to.deep.equal(["A","B","C","D", "E", "F"]);
202202
expect(BFS(B)).to.deep.equal(["B","D","E"]);
203203
expect(BFS(C)).to.deep.equal(["C","F"]);
204204
expect(BFS(D)).to.deep.equal(["D"]);

0 commit comments

Comments
 (0)