wasp/waspc/cli/test/Wasp/Cli/Command/Telemetry/ProjectTest.hs
Martin Šošić 0002414fa1
Telemetry now recognizes when running on CI. (#963)
* Telemetry now recognizes when running on CI.

* Bumped cabal version from 0.8.0 to 0.8.1 .

* fixed e2e tests.
2023-01-28 14:31:35 +01:00

26 lines
768 B
Haskell

module Wasp.Cli.Command.Telemetry.ProjectTest where
import Test.Tasty.Hspec
import Wasp.Cli.Command.Telemetry.Project
( checkIfEnvValueIsTruthy,
)
spec_checkIfEnvValueIsTruthy :: Spec
spec_checkIfEnvValueIsTruthy = do
it "Correctly determines if different env values are truthy" $ do
let testCases =
[ (Nothing, False),
(Just "", False),
(Just "false", False),
(Just "False", False),
(Just "FALSE", False),
(Just "true", True),
(Just "something", True),
(Just "0", True),
(Just "1", True),
(Just "falsy", True),
(Just "foo", True)
]
checkIfEnvValueIsTruthy . fst <$> testCases
`shouldBe` snd <$> testCases