MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / isCorrectSubject

Function isCorrectSubject

test/integration/formats-test.mjs:25–31  ·  view source on GitHub ↗
(idFragment)

Source from the content-addressed store, hash-verified

23
24 describe('JSON-LD', function () {
25 function isCorrectSubject (idFragment) {
26 return (res) => {
27 const payload = JSON.parse(res.text)
28 const id = payload['@id']
29 assert(id.endsWith(idFragment), 'The subject of the JSON-LD graph is correct')
30 }
31 }
32 function isValidJSON (res) {
33 // This would throw an error
34 JSON.parse(res.text)

Callers 1

formats-test.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected