package validate import ( "path/filepath" "testing" ) // TestShippedDataHasNoUnknownFields guards the authored content tree against // misspelled or stale YAML keys: every data file is decoded with // KnownFields(true), so an unread key (like the old exit-level // set_player_flags or the legacy triggers key) fails CI instead of being // silently discarded at load time. func TestShippedDataHasNoUnknownFields(t *testing.T) { dataDir := filepath.Join("..", "..", "data") for _, issue := range validateKnownFields(dataDir, nil) { if issue.Level == "ERROR" { t.Errorf("%s", issue.Message) } } }