tests/Warship.test.ts

This commit is contained in:
Scott Anderson
2025-05-14 22:57:20 -04:00
parent 8cce70fe30
commit f22717a7d5
+7 -2
View File
@@ -90,8 +90,13 @@ describe("Warship", () => {
// Warship need one more tick (for warship exec to actually build warship)
game.executeNextTick();
expect(player1.units(UnitType.Warship)).toHaveLength(1);
expect(player1.units(UnitType.Port)).toHaveLength(1);
const dstPort = player1.buildUnit(UnitType.Port, game.ref(coastX, 10), {});
const dstPort = player2.buildUnit(
UnitType.Port,
game.ref(coastX + 2, 10),
{},
);
// Cannot buildExec with trade ship as it's not buildable (but
// we can obviously directly add it to the player)
@@ -116,7 +121,7 @@ describe("Warship", () => {
constructionExecution(game, player1.id(), coastX + 1, 10, UnitType.Warship);
expect(player1.units(UnitType.Warship)).toHaveLength(1);
const dstPort = player1.buildUnit(UnitType.Port, game.ref(coastX, 10), {});
const [dstPort] = player1.units(UnitType.Port);
player1.units(UnitType.Port)[0].delete();
// Cannot buildExec with trade ship as it's not buildable (but