{"action":"closed","number":252,"pull_request":{"url":"https://api.github.com/repos/scrollback/pure/pulls/252","id":68477218,"html_url":"https://github.com/scrollback/pure/pull/252","diff_url":"https://github.com/scrollback/pure/pull/252.diff","patch_url":"https://github.com/scrollback/pure/pull/252.patch","issue_url":"https://api.github.com/repos/scrollback/pure/issues/252","number":252,"state":"closed","locked":false,"title":"Fix the tests","user":{"login":"satya164","id":1174278,"avatar_url":"https://avatars.githubusercontent.com/u/1174278?v=3","gravatar_id":"","url":"https://api.github.com/users/satya164","html_url":"https://github.com/satya164","followers_url":"https://api.github.com/users/satya164/followers","following_url":"https://api.github.com/users/satya164/following{/other_user}","gists_url":"https://api.github.com/users/satya164/gists{/gist_id}","starred_url":"https://api.github.com/users/satya164/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satya164/subscriptions","organizations_url":"https://api.github.com/users/satya164/orgs","repos_url":"https://api.github.com/users/satya164/repos","events_url":"https://api.github.com/users/satya164/events{/privacy}","received_events_url":"https://api.github.com/users/satya164/received_events","type":"User","site_admin":false},"body":"Most of our tests were broken, so I fixed most of them. While fixing the tests, I also moved them from Jest to AVA.\r\n\r\nJest needs a complicated trial and error setup. You need to manually unmock many of the deps to get it working. In addition, it is slower compared to AVA, and we're not really using it's mock feature anywhere right now. When we need mocks, we can always use third party modules like `mockery` instead.\r\n\r\nI could have migrated the tests to mocha, but AVA has some nice features which make it easier to use. Assertion planning is one of them. For example, when I write tests which have assertions in loops or callbacks, I can just specify the number of assertions I expect, and if it varies, the test will fail. Without this, I would need to keep a counter and track them manually. In addition, it has inbuilt support for Babel, and gives correct stack traces for the test files, unlike mocha.\r\n\r\nMost importantly, all tests ported to AVA now pass. So we can re-enable Travis and add new tests as we go.\r\n\r\nThere are 4-5 test files remaining which I couldn't port. They don't run under Jest either. The modules aren't written in a very testable manner, so we'll need to do minor refactoring to write tests for them.\r\n\r\nI've removed the Jest dependency and setup, so you cannot write new tests with Jest after this gets merged.","created_at":"2016-04-30T19:51:46Z","updated_at":"2016-04-30T19:56:44Z","closed_at":"2016-04-30T19:56:44Z","merged_at":"2016-04-30T19:56:44Z","merge_commit_sha":"513f8a979a1abdf2c39a8b2a85347c74de45a7ea","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scrollback/pure/pulls/252/commits","review_comments_url":"https://api.github.com/repos/scrollback/pure/pulls/252/comments","review_comment_url":"https://api.github.com/repos/scrollback/pure/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scrollback/pure/issues/252/comments","statuses_url":"https://api.github.com/repos/scrollback/pure/statuses/e2f64908948e13a74e8a557904f3ee7509cd9622","head":{"label":"scrollback:ava-test","ref":"ava-test","sha":"e2f64908948e13a74e8a557904f3ee7509cd9622","user":{"login":"scrollback","id":4928074,"avatar_url":"https://avatars.githubusercontent.com/u/4928074?v=3","gravatar_id":"","url":"https://api.github.com/users/scrollback","html_url":"https://github.com/scrollback","followers_url":"https://api.github.com/users/scrollback/followers","following_url":"https://api.github.com/users/scrollback/following{/other_user}","gists_url":"https://api.github.com/users/scrollback/gists{/gist_id}","starred_url":"https://api.github.com/users/scrollback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrollback/subscriptions","organizations_url":"https://api.github.com/users/scrollback/orgs","repos_url":"https://api.github.com/users/scrollback/repos","events_url":"https://api.github.com/users/scrollback/events{/privacy}","received_events_url":"https://api.github.com/users/scrollback/received_events","type":"Organization","site_admin":false},"repo":{"id":44436141,"name":"pure","full_name":"scrollback/pure","owner":{"login":"scrollback","id":4928074,"avatar_url":"https://avatars.githubusercontent.com/u/4928074?v=3","gravatar_id":"","url":"https://api.github.com/users/scrollback","html_url":"https://github.com/scrollback","followers_url":"https://api.github.com/users/scrollback/followers","following_url":"https://api.github.com/users/scrollback/following{/other_user}","gists_url":"https://api.github.com/users/scrollback/gists{/gist_id}","starred_url":"https://api.github.com/users/scrollback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrollback/subscriptions","organizations_url":"https://api.github.com/users/scrollback/orgs","repos_url":"https://api.github.com/users/scrollback/repos","events_url":"https://api.github.com/users/scrollback/events{/privacy}","received_events_url":"https://api.github.com/users/scrollback/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scrollback/pure","description":"","fork":false,"url":"https://api.github.com/repos/scrollback/pure","forks_url":"https://api.github.com/repos/scrollback/pure/forks","keys_url":"https://api.github.com/repos/scrollback/pure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scrollback/pure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scrollback/pure/teams","hooks_url":"https://api.github.com/repos/scrollback/pure/hooks","issue_events_url":"https://api.github.com/repos/scrollback/pure/issues/events{/number}","events_url":"https://api.github.com/repos/scrollback/pure/events","assignees_url":"https://api.github.com/repos/scrollback/pure/assignees{/user}","branches_url":"https://api.github.com/repos/scrollback/pure/branches{/branch}","tags_url":"https://api.github.com/repos/scrollback/pure/tags","blobs_url":"https://api.github.com/repos/scrollback/pure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scrollback/pure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scrollback/pure/git/refs{/sha}","trees_url":"https://api.github.com/repos/scrollback/pure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scrollback/pure/statuses/{sha}","languages_url":"https://api.github.com/repos/scrollback/pure/languages","stargazers_url":"https://api.github.com/repos/scrollback/pure/stargazers","contributors_url":"https://api.github.com/repos/scrollback/pure/contributors","subscribers_url":"https://api.github.com/repos/scrollback/pure/subscribers","subscription_url":"https://api.github.com/repos/scrollback/pure/subscription","commits_url":"https://api.github.com/repos/scrollback/pure/commits{/sha}","git_commits_url":"https://api.github.com/repos/scrollback/pure/git/commits{/sha}","comments_url":"https://api.github.com/repos/scrollback/pure/comments{/number}","issue_comment_url":"https://api.github.com/repos/scrollback/pure/issues/comments{/number}","contents_url":"https://api.github.com/repos/scrollback/pure/contents/{+path}","compare_url":"https://api.github.com/repos/scrollback/pure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scrollback/pure/merges","archive_url":"https://api.github.com/repos/scrollback/pure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scrollback/pure/downloads","issues_url":"https://api.github.com/repos/scrollback/pure/issues{/number}","pulls_url":"https://api.github.com/repos/scrollback/pure/pulls{/number}","milestones_url":"https://api.github.com/repos/scrollback/pure/milestones{/number}","notifications_url":"https://api.github.com/repos/scrollback/pure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scrollback/pure/labels{/name}","releases_url":"https://api.github.com/repos/scrollback/pure/releases{/id}","deployments_url":"https://api.github.com/repos/scrollback/pure/deployments","created_at":"2015-10-17T12:25:53Z","updated_at":"2016-04-22T12:17:06Z","pushed_at":"2016-04-30T19:56:44Z","git_url":"git://github.com/scrollback/pure.git","ssh_url":"git@github.com:scrollback/pure.git","clone_url":"https://github.com/scrollback/pure.git","svn_url":"https://github.com/scrollback/pure","homepage":null,"size":4862,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":20,"forks":4,"open_issues":20,"watchers":4,"default_branch":"master"}},"base":{"label":"scrollback:master","ref":"master","sha":"60b2f4b9337887d37665762920c60a6110a97a4f","user":{"login":"scrollback","id":4928074,"avatar_url":"https://avatars.githubusercontent.com/u/4928074?v=3","gravatar_id":"","url":"https://api.github.com/users/scrollback","html_url":"https://github.com/scrollback","followers_url":"https://api.github.com/users/scrollback/followers","following_url":"https://api.github.com/users/scrollback/following{/other_user}","gists_url":"https://api.github.com/users/scrollback/gists{/gist_id}","starred_url":"https://api.github.com/users/scrollback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrollback/subscriptions","organizations_url":"https://api.github.com/users/scrollback/orgs","repos_url":"https://api.github.com/users/scrollback/repos","events_url":"https://api.github.com/users/scrollback/events{/privacy}","received_events_url":"https://api.github.com/users/scrollback/received_events","type":"Organization","site_admin":false},"repo":{"id":44436141,"name":"pure","full_name":"scrollback/pure","owner":{"login":"scrollback","id":4928074,"avatar_url":"https://avatars.githubusercontent.com/u/4928074?v=3","gravatar_id":"","url":"https://api.github.com/users/scrollback","html_url":"https://github.com/scrollback","followers_url":"https://api.github.com/users/scrollback/followers","following_url":"https://api.github.com/users/scrollback/following{/other_user}","gists_url":"https://api.github.com/users/scrollback/gists{/gist_id}","starred_url":"https://api.github.com/users/scrollback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrollback/subscriptions","organizations_url":"https://api.github.com/users/scrollback/orgs","repos_url":"https://api.github.com/users/scrollback/repos","events_url":"https://api.github.com/users/scrollback/events{/privacy}","received_events_url":"https://api.github.com/users/scrollback/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scrollback/pure","description":"","fork":false,"url":"https://api.github.com/repos/scrollback/pure","forks_url":"https://api.github.com/repos/scrollback/pure/forks","keys_url":"https://api.github.com/repos/scrollback/pure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scrollback/pure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scrollback/pure/teams","hooks_url":"https://api.github.com/repos/scrollback/pure/hooks","issue_events_url":"https://api.github.com/repos/scrollback/pure/issues/events{/number}","events_url":"https://api.github.com/repos/scrollback/pure/events","assignees_url":"https://api.github.com/repos/scrollback/pure/assignees{/user}","branches_url":"https://api.github.com/repos/scrollback/pure/branches{/branch}","tags_url":"https://api.github.com/repos/scrollback/pure/tags","blobs_url":"https://api.github.com/repos/scrollback/pure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scrollback/pure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scrollback/pure/git/refs{/sha}","trees_url":"https://api.github.com/repos/scrollback/pure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scrollback/pure/statuses/{sha}","languages_url":"https://api.github.com/repos/scrollback/pure/languages","stargazers_url":"https://api.github.com/repos/scrollback/pure/stargazers","contributors_url":"https://api.github.com/repos/scrollback/pure/contributors","subscribers_url":"https://api.github.com/repos/scrollback/pure/subscribers","subscription_url":"https://api.github.com/repos/scrollback/pure/subscription","commits_url":"https://api.github.com/repos/scrollback/pure/commits{/sha}","git_commits_url":"https://api.github.com/repos/scrollback/pure/git/commits{/sha}","comments_url":"https://api.github.com/repos/scrollback/pure/comments{/number}","issue_comment_url":"https://api.github.com/repos/scrollback/pure/issues/comments{/number}","contents_url":"https://api.github.com/repos/scrollback/pure/contents/{+path}","compare_url":"https://api.github.com/repos/scrollback/pure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scrollback/pure/merges","archive_url":"https://api.github.com/repos/scrollback/pure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scrollback/pure/downloads","issues_url":"https://api.github.com/repos/scrollback/pure/issues{/number}","pulls_url":"https://api.github.com/repos/scrollback/pure/pulls{/number}","milestones_url":"https://api.github.com/repos/scrollback/pure/milestones{/number}","notifications_url":"https://api.github.com/repos/scrollback/pure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scrollback/pure/labels{/name}","releases_url":"https://api.github.com/repos/scrollback/pure/releases{/id}","deployments_url":"https://api.github.com/repos/scrollback/pure/deployments","created_at":"2015-10-17T12:25:53Z","updated_at":"2016-04-22T12:17:06Z","pushed_at":"2016-04-30T19:56:44Z","git_url":"git://github.com/scrollback/pure.git","ssh_url":"git@github.com:scrollback/pure.git","clone_url":"https://github.com/scrollback/pure.git","svn_url":"https://github.com/scrollback/pure","homepage":null,"size":4862,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":20,"forks":4,"open_issues":20,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scrollback/pure/pulls/252"},"html":{"href":"https://github.com/scrollback/pure/pull/252"},"issue":{"href":"https://api.github.com/repos/scrollback/pure/issues/252"},"comments":{"href":"https://api.github.com/repos/scrollback/pure/issues/252/comments"},"review_comments":{"href":"https://api.github.com/repos/scrollback/pure/pulls/252/comments"},"review_comment":{"href":"https://api.github.com/repos/scrollback/pure/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scrollback/pure/pulls/252/commits"},"statuses":{"href":"https://api.github.com/repos/scrollback/pure/statuses/e2f64908948e13a74e8a557904f3ee7509cd9622"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"aravindet","id":210455,"avatar_url":"https://avatars.githubusercontent.com/u/210455?v=3","gravatar_id":"","url":"https://api.github.com/users/aravindet","html_url":"https://github.com/aravindet","followers_url":"https://api.github.com/users/aravindet/followers","following_url":"https://api.github.com/users/aravindet/following{/other_user}","gists_url":"https://api.github.com/users/aravindet/gists{/gist_id}","starred_url":"https://api.github.com/users/aravindet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aravindet/subscriptions","organizations_url":"https://api.github.com/users/aravindet/orgs","repos_url":"https://api.github.com/users/aravindet/repos","events_url":"https://api.github.com/users/aravindet/events{/privacy}","received_events_url":"https://api.github.com/users/aravindet/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":14,"additions":1079,"deletions":1092,"changed_files":34}}