mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2026-03-13 08:51:02 +08:00
Avoid using toBeTruthy() and toBeFalsy() because of type coercion.
This commit is contained in:
@@ -27,10 +27,10 @@ describe('detectUndirectedCycleUsingDisjointSet', () => {
|
||||
.addEdge(edgeBC)
|
||||
.addEdge(edgeCD);
|
||||
|
||||
expect(detectUndirectedCycleUsingDisjointSet(graph)).toBeFalsy();
|
||||
expect(detectUndirectedCycleUsingDisjointSet(graph)).toBe(false);
|
||||
|
||||
graph.addEdge(edgeDE);
|
||||
|
||||
expect(detectUndirectedCycleUsingDisjointSet(graph)).toBeTruthy();
|
||||
expect(detectUndirectedCycleUsingDisjointSet(graph)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user