From c23c87b56fd568956d263bb8b8c5d26fbd8d01ee Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 17 Jul 2026 19:54:21 -0400 Subject: feat: add test for mob aggro --- internal/game/act_state_test.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 internal/game/act_state_test.go (limited to 'internal/game/act_state_test.go') diff --git a/internal/game/act_state_test.go b/internal/game/act_state_test.go new file mode 100644 index 0000000..0ec139f --- /dev/null +++ b/internal/game/act_state_test.go @@ -0,0 +1,22 @@ +package game + +import ( + "testing" + + "thehouseoficarus/internal/player" +) + +func TestPlayerActionDisplayFightingInCombat(t *testing.T) { + g := escapeTestGame() + inst := spawnTestMob(g, "skeleton", 100) + p := player.New("combatant") + p.EscapeDir = "north" + + g.Combat.Enter(p.Name, inst.InstanceID) + + display := g.playerActionDisplay(p) + want := "fighting a " + inst.Name + if display != want { + t.Errorf("playerActionDisplay = %q, want %q", display, want) + } +} -- cgit v1.2.3