From 11d0fb47c292a0ca25a9c377499d2b221d97a5cb Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 26 May 2023 07:40:13 +0200 Subject: Init --- test/Spec.hs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/Spec.hs (limited to 'test/Spec.hs') diff --git a/test/Spec.hs b/test/Spec.hs new file mode 100644 index 0000000..c58bbfa --- /dev/null +++ b/test/Spec.hs @@ -0,0 +1,24 @@ +import Data.JLD.Prelude + +import Data.JLD.Mime (mimeType) +import Test.Expansion (W3CExpansionTestList, expansionTests) + +import Test.Tasty + +import Network.HTTP.Req (GET (..), NoReqBody (..), defaultHttpConfig, header, https, jsonResponse, req, responseBody, runReq, (/:)) + +tests :: W3CExpansionTestList -> TestTree +tests jldExpansionTestList = + testGroup + "Tests" + [ expansionTests jldExpansionTestList + ] + +main :: IO () +main = do + jldExpansionTestList <- runReq defaultHttpConfig do + responseBody <$> req GET w3cExpansionTestListUrl NoReqBody jsonResponse (header "Accept" mimeType) + + defaultMain <| tests jldExpansionTestList + where + w3cExpansionTestListUrl = https "w3c.github.io" /: "json-ld-api" /: "tests" /: "expand-manifest.jsonld" -- cgit v1.2.3-54-g00ecf