Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarhussain committed Oct 14, 2024
1 parent a6531c7 commit b103cf5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ describe("getCommonAncestor", () => {
it(`${nodeA} & ${nodeB} -> ${ancestor}`, () => {
// biome-ignore lint/style/noNonNullAssertion: <explanation>
const ancestorNode = fc.getCommonAncestor(fc.getNode(nodeA)!, fc.getNode(nodeB)!);
expect(ancestorNode?.blockRoot).toBe(ancestor);
if(ancestorNode) {
expect(ancestorNode?.blockRoot).toBe(ancestor);
} else {
expect(ancestorNode).toBeNull();
}
});
}

Expand Down

0 comments on commit b103cf5

Please sign in to comment.