From 879b75f2011571e1427036c11ae8efbf4a406860 Mon Sep 17 00:00:00 2001 From: Sven van Heugten Date: Thu, 8 Jan 2026 22:43:26 +0100 Subject: [PATCH] Add comment to doesLightHavePowerAfter --- NightLight.Core.Tests/NightLightTests.fs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NightLight.Core.Tests/NightLightTests.fs b/NightLight.Core.Tests/NightLightTests.fs index f306268..7a6efe6 100644 --- a/NightLight.Core.Tests/NightLightTests.fs +++ b/NightLight.Core.Tests/NightLightTests.fs @@ -26,6 +26,14 @@ type NightLightTests() = fakeHome let doesLightHavePowerAfter light interactions = + // `FakeHome` intentionally doesn't expose this information, since there is no + // (easy) way for a person in the real world either to distinguish between + // a lamp that *physically* does not have power, and a lamp that has simply + // been turned off programmatically (but which still has power and can thus + // receive new commands). + // + // They can, however, deduce it by remembering the last time that they flicked + // the lamp's switch, just like this function does. interactions |> Seq.choose (fun interaction -> match interaction with