view src/json_ld_quads_test.ts @ 14:497d50f8fe5b

start some jsonldquad tests
author drewp@localhost
date Fri, 06 Dec 2019 20:34:01 -0800
parents
children 7ca4ff2088c3
line wrap: on
line source

import { eachJsonLdQuad } from './json_ld_quads';

describe("eachJsonLdQuad", () => {
    it("finds multiple graphs", () => {
    });
    it("returns quads", async () => {
        let results = [];
        await eachJsonLdQuad([
            {
                "@id": "http://example.com/g1",
                "@graph": [{
                    "@id": "http://example.com/s1",
                    "http://example.com/p1": [{ "@value": "lit1" }]
                }],
            }
        ], results.push);
        expect(results).toEqual('f')
    });
});