Skip to content

Commit 9d5eb4f

Browse files
committed
fix: correct console.error spy index in pathRandom test
The logger change formatted error args into a single string, so the message is now in errorCall[0] not errorCall[1].
1 parent f1a4300 commit 9d5eb4f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/unit/lib/pathRandom.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe('pathRandom', () => {
8181
const result = await pathRandom(graph, 'A', 'C');
8282
expect(consoleErrorSpy).toHaveBeenCalled();
8383
const errorCall = consoleErrorSpy.mock.calls[0];
84-
expect(errorCall[1]).toContain('no person found');
84+
expect(errorCall[0]).toContain('no person found');
8585
});
8686

8787
it('logs error when path dead-ends before target', async () => {

0 commit comments

Comments
 (0)