{"action":"created","issue":{"url":"https://api.github.com/repos/dareid/chakram/issues/9","labels_url":"https://api.github.com/repos/dareid/chakram/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/dareid/chakram/issues/9/comments","events_url":"https://api.github.com/repos/dareid/chakram/issues/9/events","html_url":"https://github.com/dareid/chakram/issues/9","id":78749718,"number":9,"title":"Expectation promises not fulfilled","user":{"login":"viveleroi","id":70734,"avatar_url":"https://avatars.githubusercontent.com/u/70734?v=3","gravatar_id":"","url":"https://api.github.com/users/viveleroi","html_url":"https://github.com/viveleroi","followers_url":"https://api.github.com/users/viveleroi/followers","following_url":"https://api.github.com/users/viveleroi/following{/other_user}","gists_url":"https://api.github.com/users/viveleroi/gists{/gist_id}","starred_url":"https://api.github.com/users/viveleroi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viveleroi/subscriptions","organizations_url":"https://api.github.com/users/viveleroi/orgs","repos_url":"https://api.github.com/users/viveleroi/repos","events_url":"https://api.github.com/users/viveleroi/events{/privacy}","received_events_url":"https://api.github.com/users/viveleroi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-20T23:54:39Z","updated_at":"2015-05-24T21:35:25Z","closed_at":null,"body":"Using Mocha 2.2.4, chai 2.3.0, chai-as-promised 5.0.0 - following the examples on the documentation, a failed test shows:\r\n\r\n        ✓ should have a 200 response status\r\n        1) should have a 200 response status\r\n\r\n\r\n      1 passing (65ms)\r\n      1 failing\r\n\r\n      1) API Tests Create should have a 200 response status:\r\n      Error: Some expectation promises were not fulfilled before the test finished. Ensure you are waiting for all the expectations to run\r\n\r\nRunning the pure demo code even fails:\r\n\r\n    it('should have a 200 response status', function() {\r\n        var google = chakram.get(\"http://google.com\");\r\n        expect(google).to.have.status(200);\r\n    });\r\n\r\nIf the test is successful, everything works as expected. An error causes the test to show twice in the list, show as both failed and passed.\r\n\r\nIf we wrap the promise ourselves, it works in both cases.\r\n\r\n    it('should have a 200 response status', function(done) {\r\n        response.then(function(result) {\r\n            try {\r\n                expect(result).to.have.status(200);\r\n                done();\r\n            } catch (e) {\r\n                done(e);\r\n            }\r\n        });\r\n    });"},"comment":{"url":"https://api.github.com/repos/dareid/chakram/issues/comments/105063776","html_url":"https://github.com/dareid/chakram/issues/9#issuecomment-105063776","issue_url":"https://api.github.com/repos/dareid/chakram/issues/9","id":105063776,"user":{"login":"dareid","id":7037634,"avatar_url":"https://avatars.githubusercontent.com/u/7037634?v=3","gravatar_id":"","url":"https://api.github.com/users/dareid","html_url":"https://github.com/dareid","followers_url":"https://api.github.com/users/dareid/followers","following_url":"https://api.github.com/users/dareid/following{/other_user}","gists_url":"https://api.github.com/users/dareid/gists{/gist_id}","starred_url":"https://api.github.com/users/dareid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dareid/subscriptions","organizations_url":"https://api.github.com/users/dareid/orgs","repos_url":"https://api.github.com/users/dareid/repos","events_url":"https://api.github.com/users/dareid/events{/privacy}","received_events_url":"https://api.github.com/users/dareid/received_events","type":"User","site_admin":false},"created_at":"2015-05-24T21:35:25Z","updated_at":"2015-05-24T21:35:25Z","body":"I will close this issue, hopefully I have solved your issue. If not, please feel free to reopen. "}}