{"action":"created","issue":{"url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/357","repository_url":"https://api.github.com/repos/kulshekhar/ts-jest","labels_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/357/labels{/name}","comments_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/357/comments","events_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/357/events","html_url":"https://github.com/kulshekhar/ts-jest/issues/357","id":269292417,"number":357,"title":"es6 test failed: “We don't know what to do with this node type. We were previously a Statement but we can't fit in here?”","user":{"login":"EYHN","id":13579374,"avatar_url":"https://avatars1.githubusercontent.com/u/13579374?v=4","gravatar_id":"","url":"https://api.github.com/users/EYHN","html_url":"https://github.com/EYHN","followers_url":"https://api.github.com/users/EYHN/followers","following_url":"https://api.github.com/users/EYHN/following{/other_user}","gists_url":"https://api.github.com/users/EYHN/gists{/gist_id}","starred_url":"https://api.github.com/users/EYHN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EYHN/subscriptions","organizations_url":"https://api.github.com/users/EYHN/orgs","repos_url":"https://api.github.com/users/EYHN/repos","events_url":"https://api.github.com/users/EYHN/events{/privacy}","received_events_url":"https://api.github.com/users/EYHN/received_events","type":"User","site_admin":false},"labels":[{"id":568164233,"url":"https://api.github.com/repos/kulshekhar/ts-jest/labels/on%20hold%20-%20need%20minimal%20repo%20that%20reproduces%20this%20issue","name":"on hold - need minimal repo that reproduces this issue","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-28T07:24:36Z","updated_at":"2017-10-28T12:37:30Z","closed_at":null,"author_association":"NONE","body":"- Issue\r\n\r\n\r\n<details><summary>Failed where <code>\"target\": \"es2015\"</code>:</summary><br>\r\n\r\n```\r\n> react-typescript-kits@1.0.0 test /Users/huaji/Projects/react-typescript-kits\r\n> jest --config jest.json\r\n\r\n PASS  src/utils/test/injectSaga.test.tsx\r\n FAIL  src/containers/HomePage/test/index.test.tsx\r\n  ● Test suite failed to run\r\n\r\n    /Users/huaji/Projects/react-typescript-kits/src/containers/HomePage/index.tsx: We don't know what to do with this node type. We were previously a Statement but we can't fit in here?\r\n\r\n      at NodePath.insertBefore (node_modules/babel-traverse/lib/path/modification.js:61:13)\r\n      at VisitState.insertCounter (node_modules/istanbul-lib-instrument/dist/visitor.js:197:22)\r\n      at VisitState.insertStatementCounter (node_modules/istanbul-lib-instrument/dist/visitor.js:224:18)\r\n      at VisitState.coverStatement (node_modules/istanbul-lib-instrument/dist/visitor.js:340:10)\r\n      at node_modules/istanbul-lib-instrument/dist/visitor.js:327:15\r\n          at Array.forEach (<anonymous>)\r\n      at VisitState.wrappedEntry (node_modules/istanbul-lib-instrument/dist/visitor.js:326:15)\r\n      at NodePath._call (node_modules/babel-traverse/lib/path/context.js:76:18)\r\n      at NodePath.call (node_modules/babel-traverse/lib/path/context.js:48:17)\r\n      at NodePath.visit (node_modules/babel-traverse/lib/path/context.js:105:12)\r\n\r\n PASS  src/components/helloworld/test/index.test.tsx\r\n PASS  src/utils/test/injectReducer.test.tsx\r\n FAIL  src/containers/ThemeProvider/test/index.test.tsx\r\n  ● Test suite failed to run\r\n\r\n    /Users/huaji/Projects/react-typescript-kits/src/containers/ThemeProvider/index.tsx: We don't know what to do with this node type. We were previously a Statement but we can't fit in here?\r\n\r\n      at NodePath.insertBefore (node_modules/babel-traverse/lib/path/modification.js:61:13)\r\n      at VisitState.insertCounter (node_modules/istanbul-lib-instrument/dist/visitor.js:197:22)\r\n      at VisitState.insertStatementCounter (node_modules/istanbul-lib-instrument/dist/visitor.js:224:18)\r\n      at VisitState.coverStatement (node_modules/istanbul-lib-instrument/dist/visitor.js:340:10)\r\n      at node_modules/istanbul-lib-instrument/dist/visitor.js:327:15\r\n          at Array.forEach (<anonymous>)\r\n      at VisitState.wrappedEntry (node_modules/istanbul-lib-instrument/dist/visitor.js:326:15)\r\n      at NodePath._call (node_modules/babel-traverse/lib/path/context.js:76:18)\r\n      at NodePath.call (node_modules/babel-traverse/lib/path/context.js:48:17)\r\n      at NodePath.visit (node_modules/babel-traverse/lib/path/context.js:105:12)\r\n\r\n PASS  src/containers/App/test/index.test.tsx\r\n PASS  src/utils/test/sagaInjectors.test.ts\r\n FAIL  src/containers/LanguageProvider/test/index.test.tsx\r\n  ● Test suite failed to run\r\n\r\n    /Users/huaji/Projects/react-typescript-kits/src/containers/LanguageProvider/index.tsx: We don't know what to do with this node type. We were previously a Statement but we can't fit in here?\r\n\r\n      at NodePath.insertBefore (node_modules/babel-traverse/lib/path/modification.js:61:13)\r\n      at VisitState.insertCounter (node_modules/istanbul-lib-instrument/dist/visitor.js:197:22)\r\n      at VisitState.insertStatementCounter (node_modules/istanbul-lib-instrument/dist/visitor.js:224:18)\r\n      at VisitState.coverStatement (node_modules/istanbul-lib-instrument/dist/visitor.js:340:10)\r\n      at node_modules/istanbul-lib-instrument/dist/visitor.js:327:15\r\n          at Array.forEach (<anonymous>)\r\n      at VisitState.wrappedEntry (node_modules/istanbul-lib-instrument/dist/visitor.js:326:15)\r\n      at NodePath._call (node_modules/babel-traverse/lib/path/context.js:76:18)\r\n      at NodePath.call (node_modules/babel-traverse/lib/path/context.js:48:17)\r\n      at NodePath.visit (node_modules/babel-traverse/lib/path/context.js:105:12)\r\n\r\n PASS  src/containers/App/test/selectors.test.ts\r\n PASS  src/test/i18n.test.ts\r\n PASS  src/utils/test/reducerInjectors.test.ts\r\n PASS  src/containers/LanguageProvider/test/selectors.test.ts\r\n PASS  src/containers/ThemeProvider/test/actions.test.ts\r\n PASS  src/containers/ThemeProvider/test/selectors.test.ts\r\n PASS  src/test/store.test.ts\r\n PASS  src/containers/LanguageProvider/test/actions.test.ts\r\n PASS  src/utils/test/checkStore.test.ts\r\n PASS  src/containers/LanguageProvider/test/reducer.test.ts\r\n PASS  src/containers/ThemeProvider/test/reducer.test.ts\r\n\r\nTest Suites: 3 failed, 16 passed, 19 total\r\nTests:       61 passed, 61 total\r\nSnapshots:   0 total\r\nTime:        4.538s\r\nRan all test suites.\r\n---------------------------------|----------|----------|----------|----------|----------------|\r\nFile                             |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\r\n---------------------------------|----------|----------|----------|----------|----------------|\r\nAll files                        |    39.12 |    54.55 |    48.54 |    55.19 |                |\r\n src                             |    43.02 |    55.56 |     37.5 |    48.65 |                |\r\n  i18n.ts                        |      100 |      100 |      100 |      100 |                |\r\n  main.tsx                       |        0 |        0 |        0 |        0 |... 50,51,52,53 |\r\n  reducers.ts                    |       80 |    66.67 |      100 |       80 |             12 |\r\n  store.ts                       |    83.33 |     87.5 |       50 |    83.33 |          24,25 |\r\n  withStyles.ts                  |      100 |      100 |      100 |      100 |                |\r\n src/components/LoadingIndicator |       50 |      100 |        0 |      100 |                |\r\n  index.tsx                      |       50 |      100 |        0 |      100 |                |\r\n src/components/helloworld       |    84.62 |    45.45 |    66.67 |    88.89 |                |\r\n  index.tsx                      |    84.62 |    45.45 |    66.67 |    88.89 |             13 |\r\n  messages.ts                    |      100 |      100 |      100 |      100 |                |\r\n src/containers/App              |       96 |      100 |    92.86 |      100 |                |\r\n  Header.tsx                     |       50 |      100 |        0 |      100 |                |\r\n  constants.ts                   |      100 |      100 |      100 |      100 |                |\r\n  index.tsx                      |      100 |      100 |      100 |      100 |                |\r\n  selectors.ts                   |      100 |      100 |      100 |      100 |                |\r\n src/containers/HomePage         |     0.69 |        0 |        0 |     1.64 |                |\r\n  Loadable.ts                    |       50 |      100 |        0 |       50 |              4 |\r\n  actions.ts                     |        0 |      100 |        0 |        0 |    1,2,7,13,14 |\r\n  constants.ts                   |        0 |      100 |      100 |        0 |          1,2,3 |\r\n  index.tsx                      |        0 |        0 |        0 |        0 |... 42,45,46,47 |\r\n  reducer.ts                     |        0 |        0 |        0 |        0 |... 11,16,20,24 |\r\n  saga.ts                        |        0 |        0 |        0 |        0 |   1,4,15,16,17 |\r\n  selectors.ts                   |        0 |      100 |        0 |        0 |          1,2,3 |\r\n src/containers/LanguageProvider |    21.43 |    33.33 |       30 |    42.11 |                |\r\n  actions.ts                     |      100 |      100 |      100 |      100 |                |\r\n  constants.ts                   |      100 |      100 |      100 |      100 |                |\r\n  index.tsx                      |        0 |        0 |        0 |        0 |... 7,8,9,11,12 |\r\n  reducer.ts                     |      100 |      100 |      100 |      100 |                |\r\n  selectors.ts                   |       60 |      100 |    33.33 |      100 |                |\r\n src/containers/ThemeProvider    |    21.43 |    33.33 |       30 |    42.11 |                |\r\n  actions.ts                     |      100 |      100 |      100 |      100 |                |\r\n  constants.ts                   |      100 |      100 |      100 |      100 |                |\r\n  index.tsx                      |        0 |        0 |        0 |        0 |... 7,8,9,11,12 |\r\n  reducer.ts                     |      100 |      100 |      100 |      100 |                |\r\n  selectors.ts                   |       60 |      100 |    33.33 |      100 |                |\r\n src/test                        |      100 |      100 |      100 |      100 |                |\r\n  enzymeConfigure.ts             |      100 |      100 |      100 |      100 |                |\r\n  raf.ts                         |      100 |      100 |      100 |      100 |                |\r\n src/themes                      |      100 |      100 |      100 |      100 |                |\r\n  darkTheme.ts                   |      100 |      100 |      100 |      100 |                |\r\n  defaultTheme.ts                |      100 |      100 |      100 |      100 |                |\r\n  lightTheme.ts                  |      100 |      100 |      100 |      100 |                |\r\n src/utils                       |      100 |      100 |      100 |      100 |                |\r\n  checkStore.ts                  |      100 |      100 |      100 |      100 |                |\r\n  constants.ts                   |      100 |      100 |      100 |      100 |                |\r\n  injectReducer.tsx              |      100 |      100 |      100 |      100 |                |\r\n  injectSaga.tsx                 |      100 |      100 |      100 |      100 |                |\r\n  reducerInjectors.ts            |      100 |      100 |      100 |      100 |                |\r\n  sagaInjectors.ts               |      100 |      100 |      100 |      100 |                |\r\n---------------------------------|----------|----------|----------|----------|----------------|\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\nnpm ERR! react-typescript-kits@1.0.0 test: `jest --config jest.json`\r\nnpm ERR! Exit status 1\r\nnpm ERR!\r\nnpm ERR! Failed at the react-typescript-kits@1.0.0 test script.\r\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\r\n\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR!     /Users/huaji/.npm/_logs/2017-10-28T07_17_24_050Z-debug.log\r\n```\r\n\r\n</details>\r\n\r\n<br/>\r\n\r\nno error where `\"target\": \"es5\"`.\r\n\r\n- Link to a minimal repo that reproduces this issue\r\n\r\n[source code here](https://github.com/EYHN/react-typescript-kits/tree/5f2f39736f7df0ebd9a99481d0911ab87c362f0c)\r\n\r\nRun\r\n```\r\n$ yarn\r\n$ npm run test\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/comments/340187901","html_url":"https://github.com/kulshekhar/ts-jest/issues/357#issuecomment-340187901","issue_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/357","id":340187901,"user":{"login":"EYHN","id":13579374,"avatar_url":"https://avatars1.githubusercontent.com/u/13579374?v=4","gravatar_id":"","url":"https://api.github.com/users/EYHN","html_url":"https://github.com/EYHN","followers_url":"https://api.github.com/users/EYHN/followers","following_url":"https://api.github.com/users/EYHN/following{/other_user}","gists_url":"https://api.github.com/users/EYHN/gists{/gist_id}","starred_url":"https://api.github.com/users/EYHN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EYHN/subscriptions","organizations_url":"https://api.github.com/users/EYHN/orgs","repos_url":"https://api.github.com/users/EYHN/repos","events_url":"https://api.github.com/users/EYHN/events{/privacy}","received_events_url":"https://api.github.com/users/EYHN/received_events","type":"User","site_admin":false},"created_at":"2017-10-28T12:37:30Z","updated_at":"2017-10-28T12:37:30Z","author_association":"NONE","body":"maybe this https://github.com/EYHN/react-typescript-kits/tree/bugtest"}}
{"actor":{"display_login":"EYHN"}}