{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/2059","repository_url":"https://api.github.com/repos/facebook/jest","labels_url":"https://api.github.com/repos/facebook/jest/issues/2059/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/2059/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/2059/events","html_url":"https://github.com/facebook/jest/issues/2059","id":187586436,"number":2059,"title":"Unhandled async errors crash Jest.","user":{"login":"cpojer","id":13352,"avatar_url":"https://avatars3.githubusercontent.com/u/13352?v=3","gravatar_id":"","url":"https://api.github.com/users/cpojer","html_url":"https://github.com/cpojer","followers_url":"https://api.github.com/users/cpojer/followers","following_url":"https://api.github.com/users/cpojer/following{/other_user}","gists_url":"https://api.github.com/users/cpojer/gists{/gist_id}","starred_url":"https://api.github.com/users/cpojer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpojer/subscriptions","organizations_url":"https://api.github.com/users/cpojer/orgs","repos_url":"https://api.github.com/users/cpojer/repos","events_url":"https://api.github.com/users/cpojer/events{/privacy}","received_events_url":"https://api.github.com/users/cpojer/received_events","type":"User","site_admin":false},"labels":[{"id":69880772,"url":"https://api.github.com/repos/facebook/jest/labels/Bug","name":"Bug","color":"fc2929","default":false},{"id":442759448,"url":"https://api.github.com/repos/facebook/jest/labels/Hi-Pri","name":"Hi-Pri","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-11-06T20:26:53Z","updated_at":"2017-03-10T11:33:13Z","closed_at":null,"body":"On master, I changed one of the tests in jest-haste-map from `toBeDefined()` or something to `not.toBeDefined()`. It would then go on to crash Jest:\r\n\r\n```\r\n[cpojer: ~/Projects/jest (master)]$ jest \"haste-map.*index\"\r\n\r\n RUNS  packages/jest-haste-map/src/__tests__/index-test.js\r\n\r\n/Users/cpojer/Projects/jest/packages/jest-jasmine2/node_modules/jest-matchers/build/index.js:110\r\n        throw error;\r\n        ^\r\nError: expect(received).toBeNull()\r\n\r\nExpected value to be null, instead received\r\n  undefined\r\n    at HasteMap.hasteMap.once (/Users/cpojer/Projects/jest/packages/jest-haste-map/src/__tests__/index-test.js:685:62)\r\n    at HasteMap.g (events.js:291:16)\r\n    at emitOne (events.js:96:13)\r\n    at HasteMap.emit (events.js:188:7)\r\n    at Timeout.emitChange (/Users/cpojer/Projects/jest/packages/jest-haste-map/src/index.js:562:14)\r\n    at ontimeout (timers.js:365:14)\r\n    at tryOnTimeout (timers.js:237:5)\r\n    at Timer.listOnTimeout (timers.js:207:5)\r\n```\r\n\r\n@dmitriiabramov what have we done?"},"comment":{"url":"https://api.github.com/repos/facebook/jest/issues/comments/285647139","html_url":"https://github.com/facebook/jest/issues/2059#issuecomment-285647139","issue_url":"https://api.github.com/repos/facebook/jest/issues/2059","id":285647139,"user":{"login":"IPWright83","id":1374775,"avatar_url":"https://avatars2.githubusercontent.com/u/1374775?v=3","gravatar_id":"","url":"https://api.github.com/users/IPWright83","html_url":"https://github.com/IPWright83","followers_url":"https://api.github.com/users/IPWright83/followers","following_url":"https://api.github.com/users/IPWright83/following{/other_user}","gists_url":"https://api.github.com/users/IPWright83/gists{/gist_id}","starred_url":"https://api.github.com/users/IPWright83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IPWright83/subscriptions","organizations_url":"https://api.github.com/users/IPWright83/orgs","repos_url":"https://api.github.com/users/IPWright83/repos","events_url":"https://api.github.com/users/IPWright83/events{/privacy}","received_events_url":"https://api.github.com/users/IPWright83/received_events","type":"User","site_admin":false},"created_at":"2017-03-10T11:33:13Z","updated_at":"2017-03-10T11:33:13Z","body":"Having a look through this there isn't a reproduction example, so I thought I'd include one. In here the first test will fail reporting \r\n\r\n> Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.\r\n\r\nwhile the other two tests correctly reporting back the failed expectation. Correctly works in Jasmine.\r\n\r\n```javascript\r\ndescribe(\"Error Reporting\", function() {\r\n\r\n     it(\"Async\", function(done) {\r\n       setTimeout(function() {\r\n          expect(true).toBe(false);\r\n          done();\r\n       }, 100);\r\n    });\r\n\r\n    it(\"Sync\", function() {\r\n        expect(true).toBe(false);\r\n    });\r\n\r\n    it(\"Fake Async\", function(done) {\r\n        expect(true).toBe(false);\r\n        done();\r\n    });\r\n});\r\n```"}}
{"actor":{"display_login":"IPWright83"}}