{"action":"created","issue":{"url":"https://api.github.com/repos/domenic/chai-as-promised/issues/157","repository_url":"https://api.github.com/repos/domenic/chai-as-promised","labels_url":"https://api.github.com/repos/domenic/chai-as-promised/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/domenic/chai-as-promised/issues/157/comments","events_url":"https://api.github.com/repos/domenic/chai-as-promised/issues/157/events","html_url":"https://github.com/domenic/chai-as-promised/pull/157","id":160091846,"number":157,"title":"WIP: Fix assertions broken by latest Chai","user":{"login":"meeber","id":17260989,"avatar_url":"https://avatars.githubusercontent.com/u/17260989?v=3","gravatar_id":"","url":"https://api.github.com/users/meeber","html_url":"https://github.com/meeber","followers_url":"https://api.github.com/users/meeber/followers","following_url":"https://api.github.com/users/meeber/following{/other_user}","gists_url":"https://api.github.com/users/meeber/gists{/gist_id}","starred_url":"https://api.github.com/users/meeber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meeber/subscriptions","organizations_url":"https://api.github.com/users/meeber/orgs","repos_url":"https://api.github.com/users/meeber/repos","events_url":"https://api.github.com/users/meeber/events{/privacy}","received_events_url":"https://api.github.com/users/meeber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-14T03:48:23Z","updated_at":"2016-06-17T11:12:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/domenic/chai-as-promised/pulls/157","html_url":"https://github.com/domenic/chai-as-promised/pull/157","diff_url":"https://github.com/domenic/chai-as-promised/pull/157.diff","patch_url":"https://github.com/domenic/chai-as-promised/pull/157.patch"},"body":"# DO NOT MERGE UNTIL CHAI 4 RELEASE\r\n\r\nThis PR addresses https://github.com/chaijs/chai/issues/723. To summarize, a change made to chai back in March causes the `fulfilled`, `rejected`, and `rejectedWith` assertions to stop working, as the assertions lose their promiseness. Running chai-as-promised's test suite using the latest chai from github results in 73 failed tests due to this issue.\r\n\r\nThis PR doesn't break any of chai-as-promised's tests using chai 3.5.0, and reduces the number of failed tests using the latest chai from 73 to 2.\r\n\r\nHere are the 2 tests that still fail using this PR with the latest chai:\r\n\r\n>   1) Promise-specific extensions: Using together with other Chai as Promised asserters .rejected.and.eventually.equal(42) should return a fulfilled promise:\r\n>      Error: Expected promise to be fulfilled but it was rejected with undefined\r\n> \r\n>   2) Promise-specific extensions: Using together with other Chai as Promised asserters .rejected.and.become(42) should return a fulfilled promise:\r\n>      Error: Expected promise to be fulfilled but it was rejected with undefined\r\n\r\nI'm kinda wondering if these two tests shouldn't have been passing in the first place? It seems to me that the original promise's rejection should carry over to the second assertion in the chain.\r\n\r\nThoughts about this PR and these two tests? :D"},"comment":{"url":"https://api.github.com/repos/domenic/chai-as-promised/issues/comments/226743460","html_url":"https://github.com/domenic/chai-as-promised/pull/157#issuecomment-226743460","issue_url":"https://api.github.com/repos/domenic/chai-as-promised/issues/157","id":226743460,"user":{"login":"meeber","id":17260989,"avatar_url":"https://avatars.githubusercontent.com/u/17260989?v=3","gravatar_id":"","url":"https://api.github.com/users/meeber","html_url":"https://github.com/meeber","followers_url":"https://api.github.com/users/meeber/followers","following_url":"https://api.github.com/users/meeber/following{/other_user}","gists_url":"https://api.github.com/users/meeber/gists{/gist_id}","starred_url":"https://api.github.com/users/meeber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meeber/subscriptions","organizations_url":"https://api.github.com/users/meeber/orgs","repos_url":"https://api.github.com/users/meeber/repos","events_url":"https://api.github.com/users/meeber/events{/privacy}","received_events_url":"https://api.github.com/users/meeber/received_events","type":"User","site_admin":false},"created_at":"2016-06-17T11:12:44Z","updated_at":"2016-06-17T11:12:44Z","body":"@lucasfcosta Thanks for reviewing this!\r\n\r\nI wonder the same thing about how those two tests were passing before. Would be interesting to dig deeper. Good job finding a solution!\r\n\r\nHowever, I'm still not sure I understand why they are meant to pass in the first place? Why should performing a second assertion on the rejected promise result in a fulfilled promise?"}}
{"actor":{"display_login":"meeber"}}