{"action":"opened","number":628,"pull_request":{"url":"https://api.github.com/repos/facebook/jest/pulls/628","id":52173951,"html_url":"https://github.com/facebook/jest/pull/628","diff_url":"https://github.com/facebook/jest/pull/628.diff","patch_url":"https://github.com/facebook/jest/pull/628.patch","issue_url":"https://api.github.com/repos/facebook/jest/issues/628","number":628,"state":"open","locked":false,"title":"TypeScript + Jest Tips","user":{"login":"matzjiro","id":8142134,"avatar_url":"https://avatars.githubusercontent.com/u/8142134?v=3","gravatar_id":"","url":"https://api.github.com/users/matzjiro","html_url":"https://github.com/matzjiro","followers_url":"https://api.github.com/users/matzjiro/followers","following_url":"https://api.github.com/users/matzjiro/following{/other_user}","gists_url":"https://api.github.com/users/matzjiro/gists{/gist_id}","starred_url":"https://api.github.com/users/matzjiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matzjiro/subscriptions","organizations_url":"https://api.github.com/users/matzjiro/orgs","repos_url":"https://api.github.com/users/matzjiro/repos","events_url":"https://api.github.com/users/matzjiro/events{/privacy}","received_events_url":"https://api.github.com/users/matzjiro/received_events","type":"User","site_admin":false},"body":"Motivation\r\n\r\no use of TypeScript compiler API\r\nfrom 1.6 of TypeScript, compiler API(https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API) is available, so without transpile to Javascript, TypeScript can be tested.\r\n\r\no handle limitation of npm 3.x. \r\nAs mentioned in Jest API document(https://facebook.github.io/jest/docs/api.html#content), \r\nIf you use npm 3.x,, All modules that you use unmocked while testing Must definitly unmocked,\r\nregardless of that module is directly or indirectly used.\r\n\r\nI convince this sample will help.\r\n","created_at":"2015-11-30T20:22:29Z","updated_at":"2015-11-30T20:22:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/jest/pulls/628/commits","review_comments_url":"https://api.github.com/repos/facebook/jest/pulls/628/comments","review_comment_url":"https://api.github.com/repos/facebook/jest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/jest/issues/628/comments","statuses_url":"https://api.github.com/repos/facebook/jest/statuses/304637d95f5b7c07d9cdf4f4010f2f3c41364047","head":{"label":"matzjiro:work","ref":"work","sha":"304637d95f5b7c07d9cdf4f4010f2f3c41364047","user":{"login":"matzjiro","id":8142134,"avatar_url":"https://avatars.githubusercontent.com/u/8142134?v=3","gravatar_id":"","url":"https://api.github.com/users/matzjiro","html_url":"https://github.com/matzjiro","followers_url":"https://api.github.com/users/matzjiro/followers","following_url":"https://api.github.com/users/matzjiro/following{/other_user}","gists_url":"https://api.github.com/users/matzjiro/gists{/gist_id}","starred_url":"https://api.github.com/users/matzjiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matzjiro/subscriptions","organizations_url":"https://api.github.com/users/matzjiro/orgs","repos_url":"https://api.github.com/users/matzjiro/repos","events_url":"https://api.github.com/users/matzjiro/events{/privacy}","received_events_url":"https://api.github.com/users/matzjiro/received_events","type":"User","site_admin":false},"repo":{"id":47136954,"name":"jest","full_name":"matzjiro/jest","owner":{"login":"matzjiro","id":8142134,"avatar_url":"https://avatars.githubusercontent.com/u/8142134?v=3","gravatar_id":"","url":"https://api.github.com/users/matzjiro","html_url":"https://github.com/matzjiro","followers_url":"https://api.github.com/users/matzjiro/followers","following_url":"https://api.github.com/users/matzjiro/following{/other_user}","gists_url":"https://api.github.com/users/matzjiro/gists{/gist_id}","starred_url":"https://api.github.com/users/matzjiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matzjiro/subscriptions","organizations_url":"https://api.github.com/users/matzjiro/orgs","repos_url":"https://api.github.com/users/matzjiro/repos","events_url":"https://api.github.com/users/matzjiro/events{/privacy}","received_events_url":"https://api.github.com/users/matzjiro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matzjiro/jest","description":"Painless JavaScript Unit Testing built on top of the Jasmine test framework.","fork":true,"url":"https://api.github.com/repos/matzjiro/jest","forks_url":"https://api.github.com/repos/matzjiro/jest/forks","keys_url":"https://api.github.com/repos/matzjiro/jest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matzjiro/jest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matzjiro/jest/teams","hooks_url":"https://api.github.com/repos/matzjiro/jest/hooks","issue_events_url":"https://api.github.com/repos/matzjiro/jest/issues/events{/number}","events_url":"https://api.github.com/repos/matzjiro/jest/events","assignees_url":"https://api.github.com/repos/matzjiro/jest/assignees{/user}","branches_url":"https://api.github.com/repos/matzjiro/jest/branches{/branch}","tags_url":"https://api.github.com/repos/matzjiro/jest/tags","blobs_url":"https://api.github.com/repos/matzjiro/jest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matzjiro/jest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matzjiro/jest/git/refs{/sha}","trees_url":"https://api.github.com/repos/matzjiro/jest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matzjiro/jest/statuses/{sha}","languages_url":"https://api.github.com/repos/matzjiro/jest/languages","stargazers_url":"https://api.github.com/repos/matzjiro/jest/stargazers","contributors_url":"https://api.github.com/repos/matzjiro/jest/contributors","subscribers_url":"https://api.github.com/repos/matzjiro/jest/subscribers","subscription_url":"https://api.github.com/repos/matzjiro/jest/subscription","commits_url":"https://api.github.com/repos/matzjiro/jest/commits{/sha}","git_commits_url":"https://api.github.com/repos/matzjiro/jest/git/commits{/sha}","comments_url":"https://api.github.com/repos/matzjiro/jest/comments{/number}","issue_comment_url":"https://api.github.com/repos/matzjiro/jest/issues/comments{/number}","contents_url":"https://api.github.com/repos/matzjiro/jest/contents/{+path}","compare_url":"https://api.github.com/repos/matzjiro/jest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matzjiro/jest/merges","archive_url":"https://api.github.com/repos/matzjiro/jest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matzjiro/jest/downloads","issues_url":"https://api.github.com/repos/matzjiro/jest/issues{/number}","pulls_url":"https://api.github.com/repos/matzjiro/jest/pulls{/number}","milestones_url":"https://api.github.com/repos/matzjiro/jest/milestones{/number}","notifications_url":"https://api.github.com/repos/matzjiro/jest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matzjiro/jest/labels{/name}","releases_url":"https://api.github.com/repos/matzjiro/jest/releases{/id}","created_at":"2015-11-30T18:13:59Z","updated_at":"2015-11-30T18:14:00Z","pushed_at":"2015-11-30T19:14:14Z","git_url":"git://github.com/matzjiro/jest.git","ssh_url":"git@github.com:matzjiro/jest.git","clone_url":"https://github.com/matzjiro/jest.git","svn_url":"https://github.com/matzjiro/jest","homepage":"http://facebook.github.io/jest/","size":1231,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"479e6e6ef412eb322dfe4db49948c37ba9c42d81","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":15062869,"name":"jest","full_name":"facebook/jest","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/jest","description":"Painless JavaScript Unit Testing built on top of the Jasmine test framework.","fork":false,"url":"https://api.github.com/repos/facebook/jest","forks_url":"https://api.github.com/repos/facebook/jest/forks","keys_url":"https://api.github.com/repos/facebook/jest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/jest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/jest/teams","hooks_url":"https://api.github.com/repos/facebook/jest/hooks","issue_events_url":"https://api.github.com/repos/facebook/jest/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/jest/events","assignees_url":"https://api.github.com/repos/facebook/jest/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/jest/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/jest/tags","blobs_url":"https://api.github.com/repos/facebook/jest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/jest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/jest/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/jest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/jest/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/jest/languages","stargazers_url":"https://api.github.com/repos/facebook/jest/stargazers","contributors_url":"https://api.github.com/repos/facebook/jest/contributors","subscribers_url":"https://api.github.com/repos/facebook/jest/subscribers","subscription_url":"https://api.github.com/repos/facebook/jest/subscription","commits_url":"https://api.github.com/repos/facebook/jest/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/jest/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/jest/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/jest/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/jest/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/jest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/jest/merges","archive_url":"https://api.github.com/repos/facebook/jest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/jest/downloads","issues_url":"https://api.github.com/repos/facebook/jest/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/jest/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/jest/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/jest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/jest/labels{/name}","releases_url":"https://api.github.com/repos/facebook/jest/releases{/id}","created_at":"2013-12-10T00:18:04Z","updated_at":"2015-11-30T14:44:22Z","pushed_at":"2015-11-24T15:27:12Z","git_url":"git://github.com/facebook/jest.git","ssh_url":"git@github.com:facebook/jest.git","clone_url":"https://github.com/facebook/jest.git","svn_url":"https://github.com/facebook/jest","homepage":"http://facebook.github.io/jest/","size":2059,"stargazers_count":3263,"watchers_count":3263,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":351,"mirror_url":null,"open_issues_count":96,"forks":351,"open_issues":96,"watchers":3263,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/jest/pulls/628"},"html":{"href":"https://github.com/facebook/jest/pull/628"},"issue":{"href":"https://api.github.com/repos/facebook/jest/issues/628"},"comments":{"href":"https://api.github.com/repos/facebook/jest/issues/628/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/jest/pulls/628/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/jest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/jest/pulls/628/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/jest/statuses/304637d95f5b7c07d9cdf4f4010f2f3c41364047"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":355,"deletions":0,"changed_files":10}}