Enable JSON-LD remote-doc test suite
This commit is contained in:
parent
277fabedb4
commit
1d00bc6a40
1 changed files with 20 additions and 0 deletions
20
test/suite/remote_doc_test.exs
Normal file
20
test/suite/remote_doc_test.exs
Normal 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
|
Loading…
Reference in a new issue