diff options
author | Volpeon <github@volpeon.ink> | 2023-05-26 07:40:13 +0200 |
---|---|---|
committer | Volpeon <github@volpeon.ink> | 2023-05-26 07:40:13 +0200 |
commit | 11d0fb47c292a0ca25a9c377499d2b221d97a5cb (patch) | |
tree | e729e2a4508763b3073b7eae9a56bc9c6a9ca0f7 /test/Spec.hs | |
download | hs-jsonld-11d0fb47c292a0ca25a9c377499d2b221d97a5cb.tar.gz hs-jsonld-11d0fb47c292a0ca25a9c377499d2b221d97a5cb.tar.bz2 hs-jsonld-11d0fb47c292a0ca25a9c377499d2b221d97a5cb.zip |
Init
Diffstat (limited to 'test/Spec.hs')
-rw-r--r-- | test/Spec.hs | 24 |
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 @@ | |||
1 | import Data.JLD.Prelude | ||
2 | |||
3 | import Data.JLD.Mime (mimeType) | ||
4 | import Test.Expansion (W3CExpansionTestList, expansionTests) | ||
5 | |||
6 | import Test.Tasty | ||
7 | |||
8 | import Network.HTTP.Req (GET (..), NoReqBody (..), defaultHttpConfig, header, https, jsonResponse, req, responseBody, runReq, (/:)) | ||
9 | |||
10 | tests :: W3CExpansionTestList -> TestTree | ||
11 | tests jldExpansionTestList = | ||
12 | testGroup | ||
13 | "Tests" | ||
14 | [ expansionTests jldExpansionTestList | ||
15 | ] | ||
16 | |||
17 | main :: IO () | ||
18 | main = 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" | ||