Bias the TimeChanged generator to make alarms more likely

This commit is contained in:
Sven van Heugten 2026-01-20 21:00:02 +01:00
parent fd7d927775
commit 59a1b1e41d
3 changed files with 26 additions and 4 deletions

View file

@ -41,8 +41,7 @@ type NightLightTests() =
|> Prop.label fakeHome.Label
|> Prop.trivial (fakeHome.LightsThatAreOn.Length = 0)
// TODO: Bias generator for alarm cases so that `MaxTest` can be reduced
[<Property(Arbitrary = [| typeof<ArbitraryInteractions> |], MaxTest = 10_000)>]
[<Property(Arbitrary = [| typeof<ArbitraryInteractions> |])>]
let ``All lights should either be off or have a brightness that fits its color`` (interactions: Interaction list) =
let fakeHome = createFakeHomeWithNightLightAndInteract interactions
let time = getTimeAfterInteractions interactions |> _.TimeOfDay