mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 17:20:09 +00:00
Added test for JsonLdProcessor.
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user