game: tech research action + ship-action gating by researched techs (build gate, raised caps)
This commit is contained in:
@@ -129,6 +129,10 @@ describe('buildSystem', () => {
|
||||
const { db } = await freshFile()
|
||||
await getShipState(db)
|
||||
|
||||
// WEAPONS is gated behind the WEAPONS SYSTEMS tech (issue #9) — research it directly so this
|
||||
// test keeps covering the cost path; the gate itself is covered in research.test.ts.
|
||||
await db.db.update(schema.tech).set({ researched: true }).where(eq(schema.tech.slug, 'WEAPONS_SYSTEMS'))
|
||||
|
||||
await expect(buildSystem(db, 'WEAPONS')).rejects.toMatchObject({ status: 422 }) // no parts in the hold yet
|
||||
|
||||
await addItem(db, 'part', 'SERVO ACTUATOR', BUILD_PART_COST)
|
||||
|
||||
Reference in New Issue
Block a user