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(offline): name the v6 upgrade case for what v6 does

Mauriceee921d5c28b8
diff --git a/client/tests/unit/db/offlineDb.upgrade.test.ts b/client/tests/unit/db/offlineDb.upgrade.test.ts
index bdb45ce88..9d93f35f3 100644
--- a/client/tests/unit/db/offlineDb.upgrade.test.ts
+++ b/client/tests/unit/db/offlineDb.upgrade.test.ts
@@ -238,10 +238,11 @@ const UPGRADE_CASES: Record<number, UpgradeCase> = {
},
},
6: {
- intent: 'adds the driving settings and drops the area cache that predates per-trip keys',
+ intent: 'adds the driving settings',
check: async (db) => {
await db.table('roadtripPreferences').put({ tripId: 2, preferences: {} });
expect(await db.roadtripPreferences.count()).toBe(1);
+ // The empty area cache comes from v7 and v8 on the way to the current version.
expect(await db.areaPlaces.count()).toBe(0);
expect(await db.syncMeta.get(1)).not.toHaveProperty('areaPlacesKey');
},