From 800e9cf88cc28fe33150a0f8fbf55a4fd06d7030 Mon Sep 17 00:00:00 2001 From: Jonas Erbe Date: Mon, 8 Apr 2019 11:37:17 +0200 Subject: [PATCH] Added test for JsonLdProcessor. --- types/jsonld/jsonld-tests.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/types/jsonld/jsonld-tests.ts b/types/jsonld/jsonld-tests.ts index 9e2fcf10e9..837d2ad176 100644 --- a/types/jsonld/jsonld-tests.ts +++ b/types/jsonld/jsonld-tests.ts @@ -176,3 +176,24 @@ jsonld.toRDF(doc, {produceGeneralizedRdf: false}) .then((res) => { log(res); }); + +/* + * Test class JsonLdProcessor + */ + +const processor = jsonld.JsonLdProcessor; + +processor.compact(doc, context) +.then((res) => { + log(res); +}); + +processor.expand(doc) +.then((res) => { + log(res); +}); + +processor.flatten(doc) +.then((res) => { + log(res); +});