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

Function hasHeader

test/integration/http-test.mjs:58–70  ·  view source on GitHub ↗
(rel, value)

Source from the content-addressed store, hash-verified

56 return undefined
57 }
58 const hasHeader = function (rel, value) {
59 const handler = function (res) {
60 const link = getLink(res, rel)
61 if (link) {
62 if (link !== value) {
63 throw new Error('Not same value: ' + value + ' != ' + link)
64 }
65 } else {
66 throw new Error('header does not exist: ' + rel + ' = ' + value)
67 }
68 }
69 return handler
70 }
71
72 describe('GET Root container', function () {
73 it('should exist', function (done) {

Callers 1

http-test.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected