{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/pulls/comments/46204933","id":46204933,"diff_hunk":"@@ -0,0 +1,23 @@\n+/// <reference path=\"typings/mocha/mocha.d.ts\" />\n+/// <reference path=\"typings/chai/chai.d.ts\" />\n+\n+import fs = require('fs');\n+import chai = require('chai');\n+\n+function compareText(text1: string, text2: string, ignoreWhiteSpace = true, ignoreNewLine = true){\n+\ttext1 = text1.split('\\r\\n').join('').split('\\n').join('');\n+\ttext2 = text2.split('\\r\\n').join('').split('\\n').join('');\n+\treturn text1 === text2;\n+}\n+\n+describe(\"Compare generated with baselines\", () => {\n+\tfor (var file of fs.readdirSync('generated')) {\n+\t\tvar generatedText = fs.readFileSync('generated/' + file, 'utf8');\n+\t\tvar baselinesText = fs.readFileSync('baselines/' + file, 'utf8');\n+\t\tdescribe('Comparing ' + file, () => {\n+\t\t\tit('should be the same', () => {\n+\t\t\t\tchai.expect(compareText(generatedText, baselinesText)).to.true;\n+\t\t\t})\n+\t\t})\n+\t}\n+})","path":"tests/test.ts","position":23,"original_position":23,"commit_id":"c38deffa7655b7ca4704a44181b6209131ec4f04","original_commit_id":"c38deffa7655b7ca4704a44181b6209131ec4f04","user":{"login":"DanielRosenwasser","id":972891,"avatar_url":"https://avatars.githubusercontent.com/u/972891?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielRosenwasser","html_url":"https://github.com/DanielRosenwasser","followers_url":"https://api.github.com/users/DanielRosenwasser/followers","following_url":"https://api.github.com/users/DanielRosenwasser/following{/other_user}","gists_url":"https://api.github.com/users/DanielRosenwasser/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielRosenwasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielRosenwasser/subscriptions","organizations_url":"https://api.github.com/users/DanielRosenwasser/orgs","repos_url":"https://api.github.com/users/DanielRosenwasser/repos","events_url":"https://api.github.com/users/DanielRosenwasser/events{/privacy}","received_events_url":"https://api.github.com/users/DanielRosenwasser/received_events","type":"User","site_admin":false},"body":"Use spaces in this file","created_at":"2015-11-30T21:17:04Z","updated_at":"2015-11-30T21:17:04Z","html_url":"https://github.com/Microsoft/TypeScript-TmLanguage/pull/12#discussion_r46204933","pull_request_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/pulls/comments/46204933"},"html":{"href":"https://github.com/Microsoft/TypeScript-TmLanguage/pull/12#discussion_r46204933"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/pulls/12","id":51287537,"html_url":"https://github.com/Microsoft/TypeScript-TmLanguage/pull/12","diff_url":"https://github.com/Microsoft/TypeScript-TmLanguage/pull/12.diff","patch_url":"https://github.com/Microsoft/TypeScript-TmLanguage/pull/12.patch","issue_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/issues/12","number":12,"state":"open","locked":false,"title":"Add tests and travis CI","user":{"login":"zhengbli","id":1171301,"avatar_url":"https://avatars.githubusercontent.com/u/1171301?v=3","gravatar_id":"","url":"https://api.github.com/users/zhengbli","html_url":"https://github.com/zhengbli","followers_url":"https://api.github.com/users/zhengbli/followers","following_url":"https://api.github.com/users/zhengbli/following{/other_user}","gists_url":"https://api.github.com/users/zhengbli/gists{/gist_id}","starred_url":"https://api.github.com/users/zhengbli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhengbli/subscriptions","organizations_url":"https://api.github.com/users/zhengbli/orgs","repos_url":"https://api.github.com/users/zhengbli/repos","events_url":"https://api.github.com/users/zhengbli/events{/privacy}","received_events_url":"https://api.github.com/users/zhengbli/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-19T22:01:01Z","updated_at":"2015-11-30T21:17:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af93b06a1c792286c169ac48d723f4ff71e580c8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/pulls/12/commits","review_comments_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/pulls/12/comments","review_comment_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/issues/12/comments","statuses_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/statuses/c38deffa7655b7ca4704a44181b6209131ec4f04","head":{"label":"Microsoft:addTests","ref":"addTests","sha":"c38deffa7655b7ca4704a44181b6209131ec4f04","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":44774566,"name":"TypeScript-TmLanguage","full_name":"Microsoft/TypeScript-TmLanguage","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/TypeScript-TmLanguage","description":"TextMate grammar files for TypeScript for VS Code, Sublime Text, and Atom.","fork":false,"url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage","forks_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/forks","keys_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/teams","hooks_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/events","assignees_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/tags","blobs_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/languages","stargazers_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/subscription","commits_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/merges","archive_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/downloads","issues_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/releases{/id}","created_at":"2015-10-22T21:33:24Z","updated_at":"2015-11-18T01:25:01Z","pushed_at":"2015-11-20T20:32:39Z","git_url":"git://github.com/Microsoft/TypeScript-TmLanguage.git","ssh_url":"git@github.com:Microsoft/TypeScript-TmLanguage.git","clone_url":"https://github.com/Microsoft/TypeScript-TmLanguage.git","svn_url":"https://github.com/Microsoft/TypeScript-TmLanguage","homepage":null,"size":50,"stargazers_count":5,"watchers_count":5,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":16,"forks":1,"open_issues":16,"watchers":5,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"ab17d24fed148cd789fd632d74f170c7308d75ff","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":44774566,"name":"TypeScript-TmLanguage","full_name":"Microsoft/TypeScript-TmLanguage","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/TypeScript-TmLanguage","description":"TextMate grammar files for TypeScript for VS Code, Sublime Text, and Atom.","fork":false,"url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage","forks_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/forks","keys_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/teams","hooks_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/events","assignees_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/tags","blobs_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/languages","stargazers_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/subscription","commits_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/merges","archive_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/downloads","issues_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/releases{/id}","created_at":"2015-10-22T21:33:24Z","updated_at":"2015-11-18T01:25:01Z","pushed_at":"2015-11-20T20:32:39Z","git_url":"git://github.com/Microsoft/TypeScript-TmLanguage.git","ssh_url":"git@github.com:Microsoft/TypeScript-TmLanguage.git","clone_url":"https://github.com/Microsoft/TypeScript-TmLanguage.git","svn_url":"https://github.com/Microsoft/TypeScript-TmLanguage","homepage":null,"size":50,"stargazers_count":5,"watchers_count":5,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":16,"forks":1,"open_issues":16,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/pulls/12"},"html":{"href":"https://github.com/Microsoft/TypeScript-TmLanguage/pull/12"},"issue":{"href":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/issues/12"},"comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/statuses/c38deffa7655b7ca4704a44181b6209131ec4f04"}}}}