{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/3202","repository_url":"https://api.github.com/repos/facebook/jest","labels_url":"https://api.github.com/repos/facebook/jest/issues/3202/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/3202/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/3202/events","html_url":"https://github.com/facebook/jest/issues/3202","id":216853756,"node_id":"MDU6SXNzdWUyMTY4NTM3NTY=","number":3202,"title":"Import not transpile with babel-jest","user":{"login":"brendonco","id":6521691,"node_id":"MDQ6VXNlcjY1MjE2OTE=","avatar_url":"https://avatars2.githubusercontent.com/u/6521691?v=4","gravatar_id":"","url":"https://api.github.com/users/brendonco","html_url":"https://github.com/brendonco","followers_url":"https://api.github.com/users/brendonco/followers","following_url":"https://api.github.com/users/brendonco/following{/other_user}","gists_url":"https://api.github.com/users/brendonco/gists{/gist_id}","starred_url":"https://api.github.com/users/brendonco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendonco/subscriptions","organizations_url":"https://api.github.com/users/brendonco/orgs","repos_url":"https://api.github.com/users/brendonco/repos","events_url":"https://api.github.com/users/brendonco/events{/privacy}","received_events_url":"https://api.github.com/users/brendonco/received_events","type":"User","site_admin":false},"labels":[{"id":442782992,"node_id":"MDU6TGFiZWw0NDI3ODI5OTI=","url":"https://api.github.com/repos/facebook/jest/labels/Needs%20More%20Info%20:man_shrugging:","name":"Needs More Info :man_shrugging:","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":32,"created_at":"2017-03-24T17:25:22Z","updated_at":"2018-11-11T20:34:41Z","closed_at":"2017-04-11T08:37:13Z","author_association":"NONE","body":"execute yarn test throw an exception below.\r\n\r\n```\r\n({\"Object.<anonymous>\":function(module,exports,require,__dirname,__filename,global,jest){import * as actions from \"../../src/actions/todoActions\";\r\n                                                                                             ^^^^^^\r\n    SyntaxError: Unexpected token import\r\n      \r\n      at transformAndBuildScript (node_modules/jest-runtime/build/transform.js:320:12)\r\n      at process._tickCallback (internal/process/next_tick.js:109:7)\r\n```\r\n\r\npackage.json\r\n```\r\n\"jest\": {\r\n    \"transform\": {\r\n      \"^.+\\\\.js$\": \"babel-jest\"\r\n    },\r\n    \"moduleFileExtensions\": [\r\n      \"js\",\r\n      \"jsx\"\r\n    ],\r\n    \"moduleDirectories\": [\r\n      \"node_modules\",\r\n      \"bower_components\"\r\n    ]\r\n  },\r\n```\r\n\r\n.babelrc\r\n\r\n```\r\n{\r\n  \"presets\": [\r\n    [\r\n      \"latest\", {\r\n        \"es2015\": {\r\n          \"modules\": false\r\n        }\r\n      }\r\n    ],\r\n    \"react\",\r\n    \"stage-0\"\r\n  ],\r\n  \"plugins\": [\r\n    \"react-hot-loader/babel\",\r\n    \"syntax-dynamic-import\",\r\n    [\r\n      \"transform-runtime\", {\r\n        \"helpers\": false,\r\n        \"polyfill\": false\r\n      }\r\n    ],\r\n    \"lodash\"\r\n  ],\r\n  \"env\": {\r\n    \"test\": {\r\n      \"plugins\": [\"dynamic-import-node\"]\r\n    }\r\n  },\r\n}\r\n```\r\n\r\nAny configuration I missed out?"},"comment":{"url":"https://api.github.com/repos/facebook/jest/issues/comments/437702365","html_url":"https://github.com/facebook/jest/issues/3202#issuecomment-437702365","issue_url":"https://api.github.com/repos/facebook/jest/issues/3202","id":437702365,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzcwMjM2NQ==","user":{"login":"sibelius","id":2005841,"node_id":"MDQ6VXNlcjIwMDU4NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/2005841?v=4","gravatar_id":"","url":"https://api.github.com/users/sibelius","html_url":"https://github.com/sibelius","followers_url":"https://api.github.com/users/sibelius/followers","following_url":"https://api.github.com/users/sibelius/following{/other_user}","gists_url":"https://api.github.com/users/sibelius/gists{/gist_id}","starred_url":"https://api.github.com/users/sibelius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sibelius/subscriptions","organizations_url":"https://api.github.com/users/sibelius/orgs","repos_url":"https://api.github.com/users/sibelius/repos","events_url":"https://api.github.com/users/sibelius/events{/privacy}","received_events_url":"https://api.github.com/users/sibelius/received_events","type":"User","site_admin":false},"created_at":"2018-11-11T20:34:41Z","updated_at":"2018-11-11T20:34:41Z","author_association":"NONE","body":"I'm having the same issue for transpiling the setupFiles, I'm using babel.config.js in a monorepo with yarn workspaces, what is the right way of doing this config?"}}
{"actor":{"display_login":"sibelius"}}