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(ferratas): a way without geometry really has none, the tile cache's columns join the NOT NULL count

Mauricebdb082d490dd
diff --git a/server/tests/unit/db/entity-class-fields.test.ts b/server/tests/unit/db/entity-class-fields.test.ts
index 005a6feda..8a3dfc189 100644
--- a/server/tests/unit/db/entity-class-fields.test.ts
+++ b/server/tests/unit/db/entity-class-fields.test.ts
@@ -25,7 +25,8 @@ import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest';
// + Tours: tour_types label_key, icon, color; tours.tour_type; tour_waypoints id, place_id, lat, lng, role, sequence.
// + scheduler_leases: name, owner, expires_at (the scheduler always writes all three).
// + user_sessions: id, user_id, expires_at.
-const KNOWN_UNINITIALISED_NOT_NULL_SCALARS = 446;
+// + ferrata_tiles: tile_key, payload, fetched_at (a fetched tile always carries all three).
+const KNOWN_UNINITIALISED_NOT_NULL_SCALARS = 449;
describe('entity class fields never carry a NaN initialiser (task-4-review-shape.md, Important 1)', () => {
it('CLASSFIELD-001: new X() has no own property whose value is NaN, across all 133 entities', () => {
diff --git a/server/tests/unit/nest/ferratas.helpers.test.ts b/server/tests/unit/nest/ferratas.helpers.test.ts
index 4d418331d..5dd508142 100644
--- a/server/tests/unit/nest/ferratas.helpers.test.ts
+++ b/server/tests/unit/nest/ferratas.helpers.test.ts
@@ -271,7 +271,7 @@ describe('toFerratas', () => {
{ type: 'node', id: 3, lat: 1, lon: 2 },
{ type: 'way', id: -1, geometry: line },
way(5, {}, [{ lat: 47.1, lon: 11.2 }, null]),
- way(6, {}, undefined),
+ { type: 'way', id: 6, tags: { highway: 'via_ferrata' } },
way(7, {}, [{ lat: 470, lon: 11.2 }, line[1]]),
way(8),
way(8),