Skip to content

Commit

Permalink
Speed up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stoeffel committed Sep 22, 2021
1 parent ad7d32a commit 0036cbe
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions test/Main.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module Main (main) where

import qualified Control.Concurrent.Async as Async
import qualified Data.Text.IO
import qualified Expect
import qualified Haskell.Verified.Examples as HVE
Expand Down Expand Up @@ -125,17 +126,13 @@ tests =
results <-
assets
|> List.map ("test/assets/" ++)
|> Prelude.traverse
|> Async.mapConcurrently
( \modulePath -> do
parsed <-
HVE.parse modulePath
|> Expect.fromIO
result <-
parsed
|> HVE.verify
|> Expect.fromIO
Expect.fromResult (Ok (HVE.moduleInfo parsed, result))
parsed <- HVE.parse modulePath
result <- HVE.verify parsed
Prelude.pure (HVE.moduleInfo parsed, result)
)
|> Expect.fromIO
contents <-
withTempFile (\handle -> Reporter.Stdout.report handle results)
contents
Expand Down

0 comments on commit 0036cbe

Please sign in to comment.