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.

test: type the follow-up steps and the Atlas visit filter as they are used

Maurice97455da6ca1b
diff --git a/client/scripts/eslint-baseline.json b/client/scripts/eslint-baseline.json
index b9388f89d..0ff2b72cd 100644
--- a/client/scripts/eslint-baseline.json
+++ b/client/scripts/eslint-baseline.json
@@ -35,7 +35,7 @@
},
"tests": {
"@typescript-eslint/no-explicit-any": 490,
- "@typescript-eslint/no-non-null-assertion": 1914,
+ "@typescript-eslint/no-non-null-assertion": 1915,
"@typescript-eslint/no-misused-promises": 22,
"@typescript-eslint/no-unused-vars": 51,
"@typescript-eslint/no-floating-promises": 33,
diff --git a/client/src/components/Planner/useBookingFollowUp.ts b/client/src/components/Planner/useBookingFollowUp.ts
index abd8c85c5..a7c9ae6ef 100644
--- a/client/src/components/Planner/useBookingFollowUp.ts
+++ b/client/src/components/Planner/useBookingFollowUp.ts
@@ -72,7 +72,7 @@ export function useBookingFollowUp({
/** Whether a try in this session already stored the booking, so the form holds a retry. */
holdsSaved: () => stored.current !== null,
/** What the save hands the planner, for a booking whose files are described by `description`. */
- steps: (description: string): BookingSaveSteps => ({
+ steps: (description: string): BookingSaveSteps & Required<Pick<BookingSaveSteps, 'afterSave'>> => ({
saved: stored.current ?? undefined,
afterSave: (saved) => afterSave(saved, description),
}),
diff --git a/server/tests/unit/nest/travel-stats.service.test.ts b/server/tests/unit/nest/travel-stats.service.test.ts
index e7c25d077..d06d3653e 100644
--- a/server/tests/unit/nest/travel-stats.service.test.ts
+++ b/server/tests/unit/nest/travel-stats.service.test.ts
@@ -324,7 +324,7 @@ describe('place countries without a cached region (#2875)', () => {
await cacheRegion(colosseumId, 'IT', 'IT-62');
const atlasVisited = (await atlas.stats(user.id)).countries
- .filter((c) => c.status === 'visited')
+ .filter((c) => !('status' in c) || c.status === 'visited')
.map((c) => c.code)
.sort();
expect(atlasVisited).toEqual(['IT', 'VA']);