Enable JSON-LD remote-doc test suite

This commit is contained in:
Marcel Otto 2020-06-16 22:56:13 +02:00
parent 277fabedb4
commit 1d00bc6a40

View file

@ -0,0 +1,20 @@
defmodule JSON.LD.TestSuite.RemoteDocTest do
use ExUnit.Case, async: false
import JSON.LD.TestSuite
setup_all do
[base_iri: manifest("remote-doc")["baseIri"]]
end
test_cases("remote-doc")
|> Enum.each(fn %{"name" => name, "input" => input} = test_case ->
@tag :test_suite
@tag :remote_doc_test_suite
@tag data: test_case
test "#{input}: #{name}",
%{data: %{"input" => input, "expect" => output} = test_case, base_iri: base_iri} do
assert JSON.LD.expand(j(input), test_case_options(test_case, base_iri)) == j(output)
end
end)
end