import Data.JLD.Prelude import Test.Tasty import Data.JLD.Mime (mimeType) import Test.Common (W3CTestList) import Test.Expansion (expansionTests) import Test.Flattening (flatteningTests) import Network.HTTP.Req (GET (..), NoReqBody (..), defaultHttpConfig, header, https, jsonResponse, req, responseBody, runReq, (/:)) tests :: W3CTestList -> W3CTestList -> TestTree tests expansionTestList flatteningTestList = testGroup "Tests" [ expansionTests expansionTestList , flatteningTests flatteningTestList ] main :: IO () main = do expansionTestList <- runReq defaultHttpConfig do responseBody <$> req GET w3cExpansionTestListUrl NoReqBody jsonResponse (header "Accept" mimeType) flatteningTestList <- runReq defaultHttpConfig do responseBody <$> req GET w3cFlatteningTestListUrl NoReqBody jsonResponse (header "Accept" mimeType) defaultMain <| tests expansionTestList flatteningTestList where w3cExpansionTestListUrl = https "w3c.github.io" /: "json-ld-api" /: "tests" /: "expand-manifest.jsonld" w3cFlatteningTestListUrl = https "w3c.github.io" /: "json-ld-api" /: "tests" /: "flatten-manifest.jsonld"