Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

fix(mcp): a transport priced without a category is stored under its Costs key

Maurice67ca58f2a52e
diff --git a/server/tests/unit/mcp/tools-transports.test.ts b/server/tests/unit/mcp/tools-transports.test.ts
index 2a8e4506e..17c82c6e8 100644
--- a/server/tests/unit/mcp/tools-transports.test.ts
+++ b/server/tests/unit/mcp/tools-transports.test.ts
@@ -366,7 +366,8 @@ describe('Transport tools: the price link', () => {
});
const data = parseToolResult(result) as { reservation: { id: number } };
const item = await findRow(orm, BudgetItems, { reservation: data.reservation.id });
- expect(item?.category).toBe('train');
+ // The type is stored as its Costs key: a train is a transport (#2835).
+ expect(item?.category).toBe('transport');
});
});