mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 16:56:38 +00:00
tests/Warship.test.ts
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user