test(tours): a failed leg in the repo test carries its at, as the contract has it

This commit is contained in:
Maurice
2026-10-18 22:46:19 +02:00
parent 0619a6b324
commit ffaca92ae0
+2 -2
View File
@@ -112,9 +112,9 @@ describe('paddleRouteRepo', () => {
await paddleRouteRepo.plan(103, [{ from: A, to: B }], { boat: 'kayak', lakeStyle: 'shore' });
expect(paddleRouteApi.plan).toHaveBeenCalledTimes(3);
vi.mocked(paddleRouteApi.plan).mockResolvedValue({ legs: [{ status: 'failed', code: 'busy' }], graph_rev: null });
vi.mocked(paddleRouteApi.plan).mockResolvedValue({ legs: [{ status: 'failed', code: 'busy', at: null }], graph_rev: null });
await expect(paddleRouteRepo.plan(103, [{ from: B, to: C }], KAYAK)).resolves.toEqual([
{ status: 'failed', code: 'busy' },
{ status: 'failed', code: 'busy', at: null },
]);
answerAll();
const again = await paddleRouteRepo.plan(103, [{ from: B, to: C }], KAYAK);