Skip to content

Instantly share code, notes, and snippets.

@OliverUv
Created November 6, 2013 18:18
Show Gist options
  • Save OliverUv/7341296 to your computer and use it in GitHub Desktop.
Save OliverUv/7341296 to your computer and use it in GitHub Desktop.
․[{"user":"asdf","password":"asdf","desc":"asdf","messages":[],"friends":{},"_id":"527a810412dc9d8564000001"},{"user":"qwer","password":"qwer","desc":"qwer","messages":[],"friends":{},"_id":"527a811912dc9d8564000002"},{"user":"test","password":"123","desc":"hej hej","messages":[],"friends":{},"_id":"527a85c512dc9d8564000005"},{"_id":"527a820212dc9d8564000003","desc":"g","friends":{},"messages":["test1: gunnargunnargunnargunnargunnar"],"password":"lol","user":"test1"},{"_id":"527a820912dc9d8564000004","desc":"sss","friends":{},"messages":["test1: gunnargunnargunnargunnargunnar \n was HERE !"],"password":"lol","user":"test2"}]
[{"user":"asdf","password":"asdf","desc":"asdf","messages":[],"friends":{},"_id":"527a810412dc9d8564000001"},{"user":"qwer","password":"qwer","desc":"qwer","messages":[],"friends":{},"_id":"527a811912dc9d8564000002"},{"user":"test","password":"123","desc":"hej hej","messages":[],"friends":{},"_id":"527a85c512dc9d8564000005"},{"_id":"527a820212dc9d8564000003","desc":"g","friends":{},"messages":["test1: gunnargunnargunnargunnargunnar"],"password":"lol","user":"test1"},{"_id":"527a820912dc9d8564000004","desc":"sss","friends":{},"messages":["test1: gunnargunnargunnargunnargunnar \n was HERE !"],"password":"lol","user":"test2"}]
․․․․․․․․․․․․․․․․․․TypeError: Cannot call method 'push' of undefined
at app.post.db.open.db.collection.collection.update.user (/home/oliver/Downloads/Twix/lib-cov/server.js:626:24)
at callbacks (/home/oliver/Downloads/Twix/node_modules/express/lib/router/index.js:164:37)
at param (/home/oliver/Downloads/Twix/node_modules/express/lib/router/index.js:138:11)
at pass (/home/oliver/Downloads/Twix/node_modules/express/lib/router/index.js:145:5)
at Router._dispatch (/home/oliver/Downloads/Twix/node_modules/express/lib/router/index.js:173:5)
at Object.router (/home/oliver/Downloads/Twix/node_modules/express/lib/router/index.js:33:10)
at next (/home/oliver/Downloads/Twix/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at next (/home/oliver/Downloads/Twix/node_modules/express/node_modules/connect/lib/middleware/session.js:312:9)
at /home/oliver/Downloads/Twix/node_modules/express/node_modules/connect/lib/middleware/session.js:336:9
at /home/oliver/Downloads/Twix/node_modules/connect-mongo/lib/connect-mongo.js:194:17
at /home/oliver/Downloads/Twix/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/collection.js:1010:5
at Cursor.nextObject (/home/oliver/Downloads/Twix/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/cursor.js:653:5)
at commandHandler (/home/oliver/Downloads/Twix/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/cursor.js:635:14)
at null.<anonymous> (/home/oliver/Downloads/Twix/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/db.js:1709:18)
at g (events.js:175:14)
at EventEmitter.emit (events.js:106:17)
at Server.Base._callHandler (/home/oliver/Downloads/Twix/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/connection/base.js:130:25)
at /home/oliver/Downloads/Twix/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:522:20
at MongoReply.parseBody (/home/oliver/Downloads/Twix/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:132:5)
at null.<anonymous> (/home/oliver/Downloads/Twix/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:481:22)
at EventEmitter.emit (events.js:95:17)
at null.<anonymous> (/home/oliver/Downloads/Twix/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:190:13)
at EventEmitter.emit (events.js:98:17)
at Socket.<anonymous> (/home/oliver/Downloads/Twix/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/connection/connection.js:382:22)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:736:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
at readableAddChunk (_stream_readable.js:165:9)
at Socket.Readable.push (_stream_readable.js:127:10)
at TCP.onread (net.js:526:21)
․․․․
20 passing (1s)
3 failing
1) Server Get /loginreq should return 200:
Uncaught AssertionError: expected response code of 200 'OK', but got 400 'Bad Request'
at Object.Assertion.status (/home/oliver/Downloads/Twix/node_modules/should/lib/should.js:892:10)
at /home/oliver/Downloads/Twix/test/test.js:219:37
at Request.callback (/home/oliver/Downloads/Twix/node_modules/superagent/lib/node/index.js:628:30)
at Request.<anonymous> (/home/oliver/Downloads/Twix/node_modules/superagent/lib/node/index.js:131:10)
at Request.EventEmitter.emit (events.js:117:20)
at ClientRequest.<anonymous> (/home/oliver/Downloads/Twix/node_modules/superagent/lib/node/index.js:757:12)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at HTTPParser.parserOnIncomingClient (http.js:1658:21)
at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:119:23)
at Socket.socketOnData (http.js:1553:20)
at TCP.onread (net.js:525:27)
2) Server Get /profilesend should return 200:
Uncaught AssertionError: expected response code of 200 'OK', but got 500 'Internal Server Error'
at Object.Assertion.status (/home/oliver/Downloads/Twix/node_modules/should/lib/should.js:892:10)
at /home/oliver/Downloads/Twix/test/test.js:243:37
at Request.callback (/home/oliver/Downloads/Twix/node_modules/superagent/lib/node/index.js:628:30)
at Request.<anonymous> (/home/oliver/Downloads/Twix/node_modules/superagent/lib/node/index.js:131:10)
at Request.EventEmitter.emit (events.js:117:20)
at IncomingMessage.<anonymous> (/home/oliver/Downloads/Twix/node_modules/superagent/lib/node/index.js:773:12)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:910:16
at process._tickCallback (node.js:415:13)
3) Server GET /addfriend should return status 200:
Uncaught TypeError: Cannot read property 'friends' of null
at /home/oliver/Downloads/Twix/lib-cov/server.js:508:24
at /home/oliver/Downloads/Twix/node_modules/mongodb/lib/mongodb/collection.js:953:5
at /home/oliver/Downloads/Twix/node_modules/mongodb/lib/mongodb/cursor.js:683:35
at Cursor.close (/home/oliver/Downloads/Twix/node_modules/mongodb/lib/mongodb/cursor.js:903:5)
at Cursor.nextObject (/home/oliver/Downloads/Twix/node_modules/mongodb/lib/mongodb/cursor.js:683:17)
at commandHandler (/home/oliver/Downloads/Twix/node_modules/mongodb/lib/mongodb/cursor.js:658:14)
at /home/oliver/Downloads/Twix/node_modules/mongodb/lib/mongodb/db.js:1670:9
at Server.Base._callHandler (/home/oliver/Downloads/Twix/node_modules/mongodb/lib/mongodb/connection/base.js:382:41)
at /home/oliver/Downloads/Twix/node_modules/mongodb/lib/mongodb/connection/server.js:472:18
at MongoReply.parseBody (/home/oliver/Downloads/Twix/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
at null.<anonymous> (/home/oliver/Downloads/Twix/node_modules/mongodb/lib/mongodb/connection/server.js:430:20)
at EventEmitter.emit (events.js:95:17)
at null.<anonymous> (/home/oliver/Downloads/Twix/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:191:13)
at EventEmitter.emit (events.js:98:17)
at Socket.<anonymous> (/home/oliver/Downloads/Twix/node_modules/mongodb/lib/mongodb/connection/connection.js:384:22)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:736:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
at readableAddChunk (_stream_readable.js:165:9)
at Socket.Readable.push (_stream_readable.js:127:10)
at TCP.onread (net.js:526:21)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment