Skip to content

Instantly share code, notes, and snippets.

@melvincarvalho
Created May 11, 2017 14:51
Show Gist options
  • Save melvincarvalho/013ea8c21089dcb36e5c32947882cf5a to your computer and use it in GitHub Desktop.
Save melvincarvalho/013ea8c21089dcb36e5c32947882cf5a to your computer and use it in GitHub Desktop.
node solid server tests
1) AccountManager (account creation tests) accessing accounts should be able to access public file of an account:
TypeError: Cannot read property 'status' of undefined
at Test._assertStatus (node_modules/supertest/lib/test.js:229:10)
at Test._assertFunction (node_modules/supertest/lib/test.js:247:11)
at Test.assert (node_modules/supertest/lib/test.js:148:18)
at assert (node_modules/supertest/lib/test.js:127:12)
at node_modules/supertest/lib/test.js:124:5
at Test.Request.callback (node_modules/superagent/lib/node/index.js:687:12)
at ClientRequest.<anonymous> (node_modules/superagent/lib/node/index.js:639:10)
at TLSSocket.socketErrorListener (_http_client.js:306:9)
at connectErrorNT (net.js:1015:8)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
2) Accounts API "before all" hook:
Uncaught Error: listen EADDRINUSE :::5001
at Object.exports._errnoException (util.js:949:11)
at exports._exceptionWithHostPort (util.js:972:20)
at Server._listen2 (net.js:1253:14)
at listen (net.js:1289:10)
at Server.listen (net.js:1385:5)
at parallel (test/api-accounts.js:60:28)
at node_modules/run-parallel/index.js:41:7
at Array.forEach (native)
at module.exports (node_modules/run-parallel/index.js:40:11)
at Context.<anonymous> (test/api-accounts.js:54:5)
3) HTTP APIs GET API should have glob support:
Uncaught TypeError: Cannot read property 'uri' of undefined
at Object.serialize (node_modules/rdflib/lib/serialize.js:14:24)
at lib/handlers/get.js:12:1150
at node_modules/async/lib/async.js:52:16
at done (node_modules/async/lib/async.js:246:17)
at node_modules/async/lib/async.js:44:16
at lib/handlers/get.js:12:1061
at aclAllow (lib/handlers/get.js:13:411)
at lib/handlers/get.js:12:566
at tryToString (fs.js:449:3)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:436:12)
4) PATCH nothing should change with empty patch:
Uncaught AssertionError: expected '@prefix : </emptyExample.ttl#>.\n\n:current :temp 123 .\n\n' to equal '\n <#current> <#temp> 123 .\n'
at Test.<anonymous> (test/patch-2.js:188:16)
at Test.assert (node_modules/supertest/lib/test.js:156:6)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at emitCloseNT (net.js:1549:8)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
5) PATCH DELETE reproduce index 1 bug from pad:
Uncaught AssertionError: expected '@prefix : </existingTriple.ttl#>.\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix c: <https://www.w3.org/People/Berners-Lee/card#>.\n@prefix n: <http://rdfs.org/sioc/ns#>.\n@prefix p: <http://www.w3.org/ns/pim/pad#>.\n@prefix ic: <http://www.w3.org/2002/12/cal/ical#>.\n@prefix XML: <http://www.w3.org/2001/XMLSchema#>.\n@prefix flow: <http://www.w3.org/2005/01/wf/flow#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix ind: </parent/index.ttl#>.\n@prefix mee: <http://www.w3.org/ns/pim/meeting#>.\n\n:id1477502276660 dc:author c:i; n:content ""; p:next :this.\n\n:id1477522707481\n ic:dtstart "2016-10-26T22:58:27Z"^^XML:dateTime;\n flow:participant c:i;\n ui:backgroundColor "#c1d0c8".\n:this\n a p:Notepad;\n dc:author c:i;\n dc:created "2016-10-25T15:44:42Z"^^XML:dateTime;\n dc:title "Shared Notes";\n p:next :id1477502276660.\nind:this flow:participation :id1477522707481; mee:sharedNotes :this.\n\n' to equal '@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix meeting: <http://www.w3.org/ns/pim/meeting#>.\n@prefix card: <https://www.w3.org/People/Berners-Lee/card#>.\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.\n@prefix p: <http://www.w3.org/ns/pim/pad#>.\n@prefix in: </parent/index.ttl#>.\n@prefix n: <http://rdfs.org/sioc/ns#>.\n@prefix flow: <http://www.w3.org/2005/01/wf/flow#>.\n@prefix ic: <http://www.w3.org/2002/12/cal/ical#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n\n<#this>\n dc:author\n card:i;\n dc:created\n "2016-10-25T15:44:42Z"^^xsd:dateTime;\n dc:title\n "Shared Notes";\n a p:Notepad;\n p:next\n <#id1477502276660>.\n in:this flow:participation <#id1477522707481>; meeting:sharedNotes <#this> .\n <#id1477502276660> dc:author card:i; n:content ""; p:next <#this> .\n<#id1477522707481>\n ic:dtstart\n "2016-10-26T22:58:27Z"^^xsd:dateTime;\n flow:participant\n card:i;\n ui:backgroundColor\n "#c1d0c8".\n'
at Test.<anonymous> (test/patch-2.js:82:18)
at Test.assert (node_modules/supertest/lib/test.js:156:6)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at emitCloseNT (net.js:1549:8)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
6) PATCH DELETE and INSERT should be update a resource using SPARQL-query using `prefix`:
Uncaught AssertionError: expected '@prefix : </prefixSparql.ttl#>.\n@prefix schema: <http://schema.org/>.\n@prefix pro: <http://ogp.me/ns/profile#>.\n\n: a schema:Person; pro:first_name "Timothy".\n\n' to equal '@prefix schema: <http://schema.org/>.\n@prefix profile: <http://ogp.me/ns/profile#>.\n\n <#> profile:first_name "Timothy"; a schema:Person .\n'
at Test.<anonymous> (test/patch-2.js:110:18)
at Test.assert (node_modules/supertest/lib/test.js:156:6)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at emitCloseNT (net.js:1549:8)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
7) PATCH INSERT should add a new triple:
Uncaught AssertionError: expected '@prefix : </addingTriple.ttl#>.\n\n:current :temp 123 .\n\n:test :hello 456 .\n\n' to equal '\n <#current> <#temp> 123 .\n <#test> <#hello> 456 .\n'
at Test.<anonymous> (test/patch-2.js:132:18)
at Test.assert (node_modules/supertest/lib/test.js:156:6)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at emitCloseNT (net.js:1549:8)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
8) PATCH INSERT should add value to existing triple:
Uncaught AssertionError: expected '@prefix : </addingTripleValue.ttl#>.\n\n:current :temp 123, 456 .\n\n' to equal '\n <#current> <#temp> 123, 456 .\n'
at Test.<anonymous> (test/patch-2.js:151:18)
at Test.assert (node_modules/supertest/lib/test.js:156:6)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at emitCloseNT (net.js:1549:8)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
9) PATCH INSERT should add value to same subject:
Uncaught AssertionError: expected '@prefix : </addingTripleSubj.ttl#>.\n\n:current :temp 123; :temp2 456 .\n\n' to equal '\n <#current> <#temp2> 456; <#temp> 123 .\n'
at Test.<anonymous> (test/patch-2.js:169:18)
at Test.assert (node_modules/supertest/lib/test.js:156:6)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at emitCloseNT (net.js:1549:8)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
10) PATCH should create a new file if file does not exist:
Uncaught AssertionError: expected '@prefix : </notExisting.ttl#>.\n\n:test :hello 456 .\n\n' to equal '\n <#test> <#hello> 456 .\n'
at Test.<anonymous> (test/patch.js:27:16)
at Test.assert (node_modules/supertest/lib/test.js:156:6)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at emitCloseNT (net.js:1549:8)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
11) PATCH nothing should change with empty patch:
Uncaught AssertionError: expected '@prefix : </emptyExample.ttl#>.\n\n:current :temp 123 .\n\n' to equal '\n <#current> <#temp> 123 .\n'
at Test.<anonymous> (test/patch.js:151:16)
at Test.assert (node_modules/supertest/lib/test.js:156:6)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at emitCloseNT (net.js:1549:8)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
12) PATCH DELETE should be an empty resource if last triple is deleted:
Uncaught AssertionError: expected '@prefix : </existingTriple.ttl#>.\n\n' to equal '\n'
at Test.<anonymous> (test/patch.js:45:18)
at Test.assert (node_modules/supertest/lib/test.js:156:6)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at emitCloseNT (net.js:1549:8)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
13) PATCH DELETE and INSERT should be update a resource using SPARQL-query using `prefix`:
Uncaught AssertionError: expected '@prefix : </prefixSparql.ttl#>.\n@prefix schema: <http://schema.org/>.\n@prefix pro: <http://ogp.me/ns/profile#>.\n\n: a schema:Person; pro:first_name "Timothy".\n\n' to equal '@prefix schema: <http://schema.org/>.\n@prefix profile: <http://ogp.me/ns/profile#>.\n\n <#> profile:first_name "Timothy"; a schema:Person .\n'
at Test.<anonymous> (test/patch.js:73:18)
at Test.assert (node_modules/supertest/lib/test.js:156:6)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at emitCloseNT (net.js:1549:8)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
14) PATCH INSERT should add a new triple:
Uncaught AssertionError: expected '@prefix : </addingTriple.ttl#>.\n\n:current :temp 123 .\n\n:test :hello 456 .\n\n' to equal '\n <#current> <#temp> 123 .\n <#test> <#hello> 456 .\n'
at Test.<anonymous> (test/patch.js:95:18)
at Test.assert (node_modules/supertest/lib/test.js:156:6)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at emitCloseNT (net.js:1549:8)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
15) PATCH INSERT should add value to existing triple:
Uncaught AssertionError: expected '@prefix : </addingTripleValue.ttl#>.\n\n:current :temp 123, 456 .\n\n' to equal '\n <#current> <#temp> 123, 456 .\n'
at Test.<anonymous> (test/patch.js:114:18)
at Test.assert (node_modules/supertest/lib/test.js:156:6)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at emitCloseNT (net.js:1549:8)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
16) PATCH INSERT should add value to same subject:
Uncaught AssertionError: expected '@prefix : </addingTripleSubj.ttl#>.\n\n:current :temp 123; :temp2 456 .\n\n' to equal '\n <#current> <#temp2> 456; <#temp> 123 .\n'
at Test.<anonymous> (test/patch.js:132:18)
at Test.assert (node_modules/supertest/lib/test.js:156:6)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at emitCloseNT (net.js:1549:8)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment