1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
module Test.Hspec.Core.TimerSpec (spec) where
import Prelude ()
import Helper
-- import Test.Hspec.Core.Timer
spec :: Spec
spec = do
describe "timer action provided by withTimer" $ do
pass -- this test is fragile, see e.g. https://github.com/hspec/hspec/issues/352
{-
let
dt = 0.01
wait = sleep (dt * 1.1)
it "returns False" $ do
withTimer dt $ \timer -> do
timer `shouldReturn` False
context "after specified time" $ do
it "returns True" $ do
withTimer dt $ \timer -> do
wait
timer `shouldReturn` True
timer `shouldReturn` False
wait
wait
timer `shouldReturn` True
timer `shouldReturn` False
-}
|