Updated precipitation timing language in the shared template
This commit is contained in:
@@ -245,10 +245,16 @@ func TestBuildPrecipTimingBuildsThresholdWindows(t *testing.T) {
|
||||
if first.MaxPrecipitationProbability.Value != 60 || first.MaxPrecipitationProbability.Time.Format(time.RFC3339) != "2026-05-29T10:00:00-05:00" {
|
||||
t.Fatalf("first window max = %#v, want 60 at 10 AM", first.MaxPrecipitationProbability)
|
||||
}
|
||||
if len(first.TextDescriptions) != 2 || first.TextDescriptions[0] != "Showers" || first.TextDescriptions[1] != "Rain likely" {
|
||||
t.Fatalf("first window text descriptions = %#v, want contributing hourly descriptions", first.TextDescriptions)
|
||||
}
|
||||
second := timing.PrecipitationWindows[1]
|
||||
if second.Start.Format(time.RFC3339) != "2026-05-29T12:00:00-05:00" || second.End == nil || second.End.Format(time.RFC3339) != "2026-05-29T13:00:00-05:00" {
|
||||
t.Fatalf("second window = %#v, want noon-1 PM", second)
|
||||
}
|
||||
if len(second.TextDescriptions) != 1 || second.TextDescriptions[0] != "Thunderstorms" {
|
||||
t.Fatalf("second window text descriptions = %#v, want thunderstorm description", second.TextDescriptions)
|
||||
}
|
||||
if !timing.ThunderMentioned {
|
||||
t.Fatal("ThunderMentioned = false, want true")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user