diff --git a/src/game/engine/tests/unit/test_credits_screen.gd b/src/game/engine/tests/unit/test_credits_screen.gd index 71ed1046..fb51c85e 100644 --- a/src/game/engine/tests/unit/test_credits_screen.gd +++ b/src/game/engine/tests/unit/test_credits_screen.gd @@ -7,6 +7,13 @@ const CreditsScript: GDScript = preload("res://engine/scenes/menus/credits.gd") const CREDITS_PATH: String = "res://public/games/age-of-dwarves/data/credits.json" +func before_all() -> void: + # ThemeVocabulary is an autoload; in headless GUT the theme is never + # loaded by anyone else, so has_key/lookup return defaults until we + # call this. Mirrors what main_menu.gd does at runtime. + ThemeVocabulary.load_vocabulary("age-of-dwarves") + + func test_credits_json_exists_and_is_valid() -> void: assert_true(FileAccess.file_exists(CREDITS_PATH), "credits.json must live at the canonical game-pack path")