Skip to content

JSON-LD related tests failing in update-deps branch #1455

Closed

Description

@michielbdejong

Set up your mashlib-dev with the update-deps branches of node-solid-server and of rdflib. Run npx lerna bootstrap --force-local so they link up, and then in ./workspaces/node-solid-server, run:

DEBUG=* ./node_modules/.bin/mocha  test/integration/formats-test.js

You'll see 3 out of 4 JSON-LD tests failing:

formats
    JSON-LD
      1) should return JSON-LD document if Accept is set to only application/ld+json
      2) should return the container listing in JSON-LD if Accept is set to only application/ld+json
      ✓ should prefer to avoid translation even if type is listed with less priority
      3) should return JSON-LD document if Accept is set to application/ld+json and other types

Activity

  1. michielbdejong commented on Jul 29, 2020

    @michielbdejong
    MemberAuthor

    Running npm run watch for rdflib in a separate window, I'm seeing it hit https://github.com/linkeddata/rdflib.js/blob/update-deps/src/convert.js#L25-L27. When trying it in the REPL, I can't reproduce the error that gets thrown there:

    node
    Welcome to Node.js v12.18.0.
    Type ".help" for more information.
    > require('jsonld').fromRDF("<https://localhost:8443/patch-5-initial.ttl#Iss1408851516666> <http://www.w3.org/2005/01/wf/flow#assignee> <https://localhost:8443/patch-5-initial.ttl#TBL> .\n<https://localhost:8443/patch-5-initial.ttl#Iss1408851516666> <https://localhost:8443/patch-5-initial.ttl#ppp> \"123\"^^<http://www.w3.org/2001/XMLSchema#integer> .\n", { format: 'application/nquads' }, (err, result) => { console.log({ err, result: JSON.stringify(result) }) })
    undefined
    > {
      err: null,
      result: '[{"@id":"https://localhost:8443/patch-5-initial.ttl#Iss1408851516666","http://www.w3.org/2005/01/wf/flow#assignee":[{"@id":"https://localhost:8443/patch-5-initial.ttl#TBL"}],"https://localhost:8443/patch-5-initial.ttl#ppp":[{"@value":"123","@type":"http://www.w3.org/2001/XMLSchema#integer"}]}]'
    }
    
    > 
  2. michielbdejong commented on Jul 29, 2020

    @michielbdejong
    MemberAuthor

    Ah, using the Promise interface for jsonld.fromRDF fixes the test.

  3. michielbdejong commented on Jul 29, 2020

    @michielbdejong
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions