{"action":"created","issue":{"url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/401","repository_url":"https://api.github.com/repos/kulshekhar/ts-jest","labels_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/401/labels{/name}","comments_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/401/comments","events_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/401/events","html_url":"https://github.com/kulshekhar/ts-jest/issues/401","id":284702338,"number":401,"title":"why can not recognise class by extends React.Component","user":{"login":"zhuxiaogit","id":12389997,"avatar_url":"https://avatars1.githubusercontent.com/u/12389997?v=4","gravatar_id":"","url":"https://api.github.com/users/zhuxiaogit","html_url":"https://github.com/zhuxiaogit","followers_url":"https://api.github.com/users/zhuxiaogit/followers","following_url":"https://api.github.com/users/zhuxiaogit/following{/other_user}","gists_url":"https://api.github.com/users/zhuxiaogit/gists{/gist_id}","starred_url":"https://api.github.com/users/zhuxiaogit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhuxiaogit/subscriptions","organizations_url":"https://api.github.com/users/zhuxiaogit/orgs","repos_url":"https://api.github.com/users/zhuxiaogit/repos","events_url":"https://api.github.com/users/zhuxiaogit/events{/privacy}","received_events_url":"https://api.github.com/users/zhuxiaogit/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":4,"created_at":"2017-12-27T11:09:44Z","updated_at":"2017-12-29T08:35:35Z","closed_at":null,"author_association":"NONE","body":"- Issue\r\n\r\n[describe the issue here]\r\nwhy can not recognise class by extends React.Component?\r\n\r\n\r\n- Expected behavior\r\n\r\n[describe the expected behavior here]\r\n\r\n   E:/react_project/newBitcoinMarket-Mobile/Hicoin/src/routes/Login.tsx: Unexpected token (76:15)\r\n           }\r\n         render() {\r\n         return <react_native_1.View style={{ flex: 1, flexDirection: 'column', backgroundColor: 'white' }}>\r\n                   ^\r\n              <react_native_1.StatusBar hidden={true}/>\r\n                    <react_native_1.View style={{ height: 70, marginTop: 30 }}>\r\n                  <react_native_1.TouchableOpacity onPress={this._goBackPage} style={{\r\n\r\n\r\n- Link to a minimal repo that reproduces this issue\r\n\r\n- My Code\r\n\r\ndescribe.only(\"LoginView\", () => {\r\n    const store = new userStores\r\n    beforeEach(() => {\r\n        //mock fect\r\n        global.fetch = jest.fn().mockImplementation(() => {\r\n            var p = new Promise((resolve, reject) => {\r\n                resolve({\r\n                    code: 200,\r\n                    message: 'token'\r\n                });\r\n            });\r\n            return p;\r\n        });\r\n        //inject store\r\n        diRegister({\r\n            user: store,\r\n        });\r\n    });\r\n\r\n    it(\"test login\",  () => {\r\n        // expect(store.loginStats).toBe(false);\r\n        const wrapper = shallow(<Login/>);\r\n        wrapper.find(\"TextInput\").at(0).value = 'testName';//\r\n        wrapper.find(\"TextInput\").at(0).value = 'testPwd';\r\n        wrapper.find(\"TouchableOpacity\").at(1).simulate(\"press\");//.props().onPress()\r\n        expect(store.loginStats).toBe(true);\r\n    });\r\n    \r\n    // it(\"test login Snapshot\",  () => {\r\n    //     const wrapper = shallow(<Login/>);\r\n    //     wrapper.find(\"TextInput\").at(0).value = 'testName';//\r\n    //     wrapper.find(\"TextInput\").at(0).value = 'testPwd';\r\n    //     wrapper.find(\"TouchableOpacity\").at(1).simulate(\"press\");//.props().onPress()\r\n    //     const tree = testRenderer.create(<View/>).toJSON();\r\n    //     expect(tree).toMatchSnapshot();\r\n    // });\r\n});\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/comments/354415838","html_url":"https://github.com/kulshekhar/ts-jest/issues/401#issuecomment-354415838","issue_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/401","id":354415838,"user":{"login":"kulshekhar","id":10780624,"avatar_url":"https://avatars3.githubusercontent.com/u/10780624?v=4","gravatar_id":"","url":"https://api.github.com/users/kulshekhar","html_url":"https://github.com/kulshekhar","followers_url":"https://api.github.com/users/kulshekhar/followers","following_url":"https://api.github.com/users/kulshekhar/following{/other_user}","gists_url":"https://api.github.com/users/kulshekhar/gists{/gist_id}","starred_url":"https://api.github.com/users/kulshekhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kulshekhar/subscriptions","organizations_url":"https://api.github.com/users/kulshekhar/orgs","repos_url":"https://api.github.com/users/kulshekhar/repos","events_url":"https://api.github.com/users/kulshekhar/events{/privacy}","received_events_url":"https://api.github.com/users/kulshekhar/received_events","type":"User","site_admin":false},"created_at":"2017-12-29T08:35:35Z","updated_at":"2017-12-29T08:35:35Z","author_association":"OWNER","body":"@zhuxiaogit my main goal in asking for a minimal repo is to\r\n\r\n- ensure that I can test with the *exact* config files (package.json/tsconfig.json/...others) as you do \r\n- use the *exact* source code as the one you're having an issue with.\r\n\r\nIn most cases when I don't have the repo, there's a lot of time wasted only to find out I was using a different setup compared to the one used by the person reporting the issue.\r\n\r\n> I cost 10 minute to descript it.\r\n\r\n:)\r\n\r\nWould you be willing to spend another 10 minutes to create the minimal repo? "}}
{"actor":{"display_login":"kulshekhar"}}