{"action":"closed","issue":{"url":"https://api.github.com/repos/visionmedia/supertest/issues/248","labels_url":"https://api.github.com/repos/visionmedia/supertest/issues/248/labels{/name}","comments_url":"https://api.github.com/repos/visionmedia/supertest/issues/248/comments","events_url":"https://api.github.com/repos/visionmedia/supertest/issues/248/events","html_url":"https://github.com/visionmedia/supertest/issues/248","id":90622270,"number":248,"title":"Uncaught TypeError: undefined is not a function","user":{"login":"crypti","id":7782923,"avatar_url":"https://avatars.githubusercontent.com/u/7782923?v=3","gravatar_id":"","url":"https://api.github.com/users/crypti","html_url":"https://github.com/crypti","followers_url":"https://api.github.com/users/crypti/followers","following_url":"https://api.github.com/users/crypti/following{/other_user}","gists_url":"https://api.github.com/users/crypti/gists{/gist_id}","starred_url":"https://api.github.com/users/crypti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crypti/subscriptions","organizations_url":"https://api.github.com/users/crypti/orgs","repos_url":"https://api.github.com/users/crypti/repos","events_url":"https://api.github.com/users/crypti/events{/privacy}","received_events_url":"https://api.github.com/users/crypti/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-24T09:24:21Z","updated_at":"2015-06-29T19:26:52Z","closed_at":"2015-06-29T19:26:52Z","body":"I have problem with supertest. I run api tests. Sometimes some random tests send me this error.\r\n\r\n```javascript\r\n    Uncaught TypeError: undefined is not a function\r\n     at Socket.socketOnEnd [as onend] (http.js:1572:9)\r\n     at _stream_readable.js:943:16\r\n```\r\n\r\nExample of one test:\r\n```javascript\r\n  it(test + '. We attempt to upVote same delegate SEVERAL TIMES from random account. We expect error',function(done){\r\n           var votedDelegate = '\"+' + node.Eaccount.publicKey + '\",\"+' + node.Eaccount.publicKey + '\"';\r\n           setTimeout(function(){\r\n               node.api.put('/accounts/delegates')\r\n                   .set('Accept', 'application/json')\r\n                   .send({\r\n                       secret: Raccount.password,\r\n                       delegates: [votedDelegate]\r\n                   })\r\n                   .expect('Content-Type', /json/)\r\n                   .expect(200)\r\n                   .end(function (err, res) {\r\n                       console.log(res.body);\r\n                       node.expect(res.body).to.have.property(\"success\").to.be.false;\r\n                       node.expect(res.body).to.have.property(\"error\");\r\n                       done();\r\n                   });\r\n           }, 1000);\r\n       });\r\n```\r\n\r\nThen all other tests run good. is it some problem of supertest? "}}