{"action":"created","issue":{"url":"https://api.github.com/repos/shouldjs/should.js/issues/123","repository_url":"https://api.github.com/repos/shouldjs/should.js","labels_url":"https://api.github.com/repos/shouldjs/should.js/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/shouldjs/should.js/issues/123/comments","events_url":"https://api.github.com/repos/shouldjs/should.js/issues/123/events","html_url":"https://github.com/shouldjs/should.js/issues/123","id":181985829,"number":123,"title":"wierd recursion loop ","user":{"login":"osher","id":803101,"avatar_url":"https://avatars.githubusercontent.com/u/803101?v=3","gravatar_id":"","url":"https://api.github.com/users/osher","html_url":"https://github.com/osher","followers_url":"https://api.github.com/users/osher/followers","following_url":"https://api.github.com/users/osher/following{/other_user}","gists_url":"https://api.github.com/users/osher/gists{/gist_id}","starred_url":"https://api.github.com/users/osher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osher/subscriptions","organizations_url":"https://api.github.com/users/osher/orgs","repos_url":"https://api.github.com/users/osher/repos","events_url":"https://api.github.com/users/osher/events{/privacy}","received_events_url":"https://api.github.com/users/osher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-10T10:53:14Z","updated_at":"2016-10-10T12:22:32Z","closed_at":null,"body":"## Node.js version?\r\n6.5.0\r\n\r\n## Should.js version?\r\n11.1.0\r\n\r\n## How to reproduce it?\r\nFirst I observed that some tests I run fail, but I do not see the exception as part of the test fail.\r\nI'm running in `mocha`, and using `mocha-ui-exports` and `mocha-ui-exports-request`, but, to describe the problem in isolation I'll try the following simplification:\r\n\r\nThe test that failed, part of a test-suite factory:\r\n```\r\nif (expect.statusCode || expect.status) {\r\n    it(\"should return status \" + expect.status,  function() {\r\n        res.should.have.property('statusCode', expect.statusCode || expect.status);\r\n    });\r\n}\r\n```\r\nwhere `res` is a response object (`http.IncomingMessage`) obtained using `request/request` during the `breforeAll` hook on the same level.\r\n\r\nRunning it as is - I don't get the exceptions list in the end of the report.\r\nBut, when I tried the following:\r\n```\r\nif (expect.statusCode || expect.status)  {\r\n    it(\"should return status \" + expect.status,  function() {\r\n        try {\r\n            res.should.have.property('statusCode', expect.statusCode || expect.status);\r\n        } catch(e) { throw new Error(e.stack) }\r\n    });\r\n}\r\n```\r\nI got \r\n```\r\n Error: <error: RangeError: Maximum call stack size exceeded>\r\n      at Assertion.fail (node_modules\\should\\cjs\\should.js:205:17)\r\n      at Assertion.value [as property] (node_modules\\should\\cjs\\should.js:277:19)\r\n      at Object.suite.(anonymous function) [as should return status 200] (node_modules\\mocha-ui-exports-request\\index.js:54:35)\r\n      at Context.should return status 200 (test\\lib.web.operations.locale_POST.test.js:51:46)\r\n      at Context.should return status 200 (test\\lib.web.operations.locale_POST.test.js:53:19)\r\n```\r\n\r\nand when I tried \r\n```\r\nif (expect.statusCode || expect.status)  {\r\n    it(\"should return status \" + expect.status,  function() {\r\n        try {\r\n            res.should.have.property('statusCode', expect.statusCode || expect.status);\r\n        } catch(e) { throw new Error(e.message) }\r\n    });\r\n}\r\n```\r\n\r\nI got the attached output: [should.bug.txt](https://github.com/shouldjs/should.js/files/519314/should.bug.txt)\r\n\r\n\r\nI hope that's enough info, I'll try to be responsive and provide more data if needed"},"comment":{"url":"https://api.github.com/repos/shouldjs/should.js/issues/comments/252603132","html_url":"https://github.com/shouldjs/should.js/issues/123#issuecomment-252603132","issue_url":"https://api.github.com/repos/shouldjs/should.js/issues/123","id":252603132,"user":{"login":"osher","id":803101,"avatar_url":"https://avatars.githubusercontent.com/u/803101?v=3","gravatar_id":"","url":"https://api.github.com/users/osher","html_url":"https://github.com/osher","followers_url":"https://api.github.com/users/osher/followers","following_url":"https://api.github.com/users/osher/following{/other_user}","gists_url":"https://api.github.com/users/osher/gists{/gist_id}","starred_url":"https://api.github.com/users/osher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osher/subscriptions","organizations_url":"https://api.github.com/users/osher/orgs","repos_url":"https://api.github.com/users/osher/repos","events_url":"https://api.github.com/users/osher/events{/privacy}","received_events_url":"https://api.github.com/users/osher/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T12:22:32Z","updated_at":"2016-10-10T12:22:32Z","body":"LOL!!!\r\nI just saw that your original example just doesn't fail the assert...\r\n\r\n```\r\nvar request = require('request');\r\nvar should = require('should');\r\n\r\nrequest('http://www.google.com', function(err, res) {\r\n  try {\r\n    res.should.have.property('statusCode', 999); //TRICKY: 999 - no such code, will fail the assert\r\n  } catch (e) {\r\n    console.log(e.stack);\r\n  }\r\n  console.log('executed successfully')\r\n});\r\n\r\n```"}}
{"actor":{"display_login":"osher"}}