chore(release): v0.11.0 — skill progression & specialisation (#45)
CI / build + unit + e2e (pull_request) Successful in 2m52s
CI / build + unit + e2e (pull_request) Successful in 2m52s
This commit is contained in:
@@ -892,7 +892,7 @@ describe('backfill (old saves)', () => {
|
||||
const invBefore = await db.db.select().from(schema.inventoryItems)
|
||||
const turnBefore = (await db.db.select().from(schema.saves))[0].turn
|
||||
await getWorldState(db) // ensureSave → backfill v7 → v8 → seedCrewSkills
|
||||
expect((await db.db.select().from(schema.saves))[0].schemaVersion).toBe(8)
|
||||
expect((await db.db.select().from(schema.saves))[0].schemaVersion).toBe(SCHEMA_VERSION)
|
||||
expect(await skillMap(db, pilot.id)).toEqual({ NAVIGATION: { level: 2, xp: 10 }, SCANNING: { level: 0, xp: 0 }, ENGINEERING: { level: 0, xp: 0 }, RESEARCH: { level: 0, xp: 0 } }) // PILOT
|
||||
expect(await skillMap(db, scientist.id)).toEqual({ NAVIGATION: { level: 0, xp: 0 }, SCANNING: { level: 2, xp: 10 }, ENGINEERING: { level: 0, xp: 0 }, RESEARCH: { level: 2, xp: 10 } }) // SCIENTIST
|
||||
expect(await skillMap(db, gunner.id)).toEqual({ NAVIGATION: { level: 0, xp: 0 }, SCANNING: { level: 0, xp: 0 }, ENGINEERING: { level: 0, xp: 0 }, RESEARCH: { level: 0, xp: 0 } }) // GUNNER (all L0)
|
||||
@@ -905,7 +905,7 @@ describe('backfill (old saves)', () => {
|
||||
expect(await db.db.select().from(schema.inventoryItems)).toEqual(invBefore) // byte-identical
|
||||
const reopened = await openGameDb(file) // restart: the backfill must be a no-op
|
||||
await getWorldState(reopened)
|
||||
expect((await reopened.db.select().from(schema.saves))[0].schemaVersion).toBe(8)
|
||||
expect((await reopened.db.select().from(schema.saves))[0].schemaVersion).toBe(SCHEMA_VERSION)
|
||||
expect(Number(reopened.raw.exec('SELECT COUNT(*) FROM crew_skills')[0]?.values[0][0] ?? 0)).toBe(4 * (await reopened.db.select().from(schema.crew)).length) // still 4 rows per member
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user