aboutsummaryrefslogtreecommitdiffstats
path: root/test/Spec.hs
diff options
context:
space:
mode:
Diffstat (limited to 'test/Spec.hs')
-rw-r--r--test/Spec.hs24
1 files changed, 24 insertions, 0 deletions
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 @@
1import Data.JLD.Prelude
2
3import Data.JLD.Mime (mimeType)
4import Test.Expansion (W3CExpansionTestList, expansionTests)
5
6import Test.Tasty
7
8import Network.HTTP.Req (GET (..), NoReqBody (..), defaultHttpConfig, header, https, jsonResponse, req, responseBody, runReq, (/:))
9
10tests :: W3CExpansionTestList -> TestTree
11tests jldExpansionTestList =
12 testGroup
13 "Tests"
14 [ expansionTests jldExpansionTestList
15 ]
16
17main :: IO ()
18main = do
19 jldExpansionTestList <- runReq defaultHttpConfig do
20 responseBody <$> req GET w3cExpansionTestListUrl NoReqBody jsonResponse (header "Accept" mimeType)
21
22 defaultMain <| tests jldExpansionTestList
23 where
24 w3cExpansionTestListUrl = https "w3c.github.io" /: "json-ld-api" /: "tests" /: "expand-manifest.jsonld"