mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
test(offline): name the v6 upgrade case for what v6 does
Version 6 only adds the driving settings store; dropping the area cache is version 7. The case name claimed both, so it now names only the new store and a comment explains where the empty area cache it still checks comes from.
This commit is contained in:
@@ -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');
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user