{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/1637","repository_url":"https://api.github.com/repos/facebook/jest","labels_url":"https://api.github.com/repos/facebook/jest/issues/1637/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/1637/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/1637/events","html_url":"https://github.com/facebook/jest/issues/1637","id":175474213,"number":1637,"title":"Version 15.1.1 testRegex option does not find .jsx files by default","user":{"login":"VeeKiraRay","id":10229905,"avatar_url":"https://avatars.githubusercontent.com/u/10229905?v=3","gravatar_id":"","url":"https://api.github.com/users/VeeKiraRay","html_url":"https://github.com/VeeKiraRay","followers_url":"https://api.github.com/users/VeeKiraRay/followers","following_url":"https://api.github.com/users/VeeKiraRay/following{/other_user}","gists_url":"https://api.github.com/users/VeeKiraRay/gists{/gist_id}","starred_url":"https://api.github.com/users/VeeKiraRay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VeeKiraRay/subscriptions","organizations_url":"https://api.github.com/users/VeeKiraRay/orgs","repos_url":"https://api.github.com/users/VeeKiraRay/repos","events_url":"https://api.github.com/users/VeeKiraRay/events{/privacy}","received_events_url":"https://api.github.com/users/VeeKiraRay/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-07T11:02:13Z","updated_at":"2016-09-17T16:59:26Z","closed_at":"2016-09-14T21:40:36Z","body":"I update Jest from 13.2.3 to 15.1.1 and jest no longer found my test files with .jsx extension. \r\n\r\nPreviously I had in my jest options:\r\n\"testFileExtensions\": [\"js\", \"jsx\"]\r\nand all my test files were in \"__tests__\"-folders scattered around the project and the 13.2.3 version found and ran all my test files perfectly.\r\n\r\nNow the 15.1.1 version gave me an error message that I can't use the testFileExtension anymore and I need to use the testRegex instead. The error message included an example regex which ended with \"(js|jsx|json|node)$\". First i tried to alter that regex to my needs, but it only found my test files with .js extension.\r\n\r\nThe solution for me was to define in the settings\r\n\"moduleFileExtensions\": [\"js\", \"json\", \"node\", \"jsx\"]\r\nthe default (not defining it) is without the jsx.\r\n\r\nPreviously I didn't have the moduleFileExtensions defined so it used default, but testFileExtensions made it work.\r\n\r\nShould the default moduleFileExtensions include the jsx \r\nor \r\nshould the example regex, the one given if user is still using testFileExtension, have the jsx extension if it is not going to be found by default? \r\n\r\nThe example regex is \"(/__tests__/.*|\\\\.(test|spec))\\\\.(js|jsx|json|node)$\""},"comment":{"url":"https://api.github.com/repos/facebook/jest/issues/comments/247788624","html_url":"https://github.com/facebook/jest/issues/1637#issuecomment-247788624","issue_url":"https://api.github.com/repos/facebook/jest/issues/1637","id":247788624,"user":{"login":"altayaydemir","id":9790196,"avatar_url":"https://avatars.githubusercontent.com/u/9790196?v=3","gravatar_id":"","url":"https://api.github.com/users/altayaydemir","html_url":"https://github.com/altayaydemir","followers_url":"https://api.github.com/users/altayaydemir/followers","following_url":"https://api.github.com/users/altayaydemir/following{/other_user}","gists_url":"https://api.github.com/users/altayaydemir/gists{/gist_id}","starred_url":"https://api.github.com/users/altayaydemir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/altayaydemir/subscriptions","organizations_url":"https://api.github.com/users/altayaydemir/orgs","repos_url":"https://api.github.com/users/altayaydemir/repos","events_url":"https://api.github.com/users/altayaydemir/events{/privacy}","received_events_url":"https://api.github.com/users/altayaydemir/received_events","type":"User","site_admin":false},"created_at":"2016-09-17T16:59:26Z","updated_at":"2016-09-17T16:59:26Z","body":"In order to make both `index.jsx` and `index.test.jsx` work, I've added following lines to my jest  configuration.\r\n\r\n```json\r\n\"testRegex\": \"(/__tests__/.*|\\\\.(test|spec))\\\\.jsx?$\",\r\n\"moduleFileExtensions\": [ \"js\", \"json\", \"jsx\", \"node\" ],\r\n```"}}
{"actor":{"display_login":"altayaydemir"}}