{"action":"created","comment":{"url":"https://api.github.com/repos/angular/protractor/pulls/comments/22426717","id":22426717,"diff_hunk":"@@ -0,0 +1,76 @@\n+## Upgrading from Jasmine 1.3 to 2.0\n+\n+First, please read the official upgrade document: http://jasmine.github.io/2.0/upgrading.html\n+\n+#### Focused specs\n+\n+Instead of `iit`, please use `fit`. Instead of `ddescribe`, please use `fdescribe`.\n+\n+#### Custom matchers\n+\n+See http://jasmine.github.io/2.0/upgrading.html#section-Custom_Matchers\n+\n+Before:\n+```javascript\n+toBeCustom: function(expected) {\n+  var passed = this.actual === expected;\n+  this.message = function() {\n+    return [\n+      'Expected ' + this.actual + ' to equal ' + expected,\n+      'Expected ' + this.actual + ' not to equal ' + expected\n+    ];\n+  };\n+  return passed;\n+};\n+```\n+\n+Now:\n+```javascript\n+toBeCustom: function(util, customEqualityTesters) {\n+  return {\n+    compare: function(actual, expected) {\n+      var passed = actual === expected\n+      return {\n+        pass: passed,\n+        message: 'Expected ' + actual + (passed ? '' : ' not') + ' to equal ' + expected\n+      };\n+    }\n+  };\n+}\n+```\n+\n+#### Asynchronous specs\n+\n+You can still pass in the done parameter as part of your asynchronous spec, but the syntax for failing it has changed.\n+\n+Before:\n+```javascript\n+it(\"async spec\", function(done) {\n+  setTimeout(function() {\n+    if (passed) {\n+      done(); // When done\n+    } else {\n+      done('failure message'); // To fail spec\n+    }\n+  }, 5000);\n+});\n+```\n+\n+Now:\n+```javascript\n+it(\"async spec\", function(done) {\n+  setTimeout(function() {\n+    if (passed) {\n+      done(); // When done\n+    } else {\n+      done.fail('failure message'); // To fail spec\n+        // or\n+      this.fail('failure message'); // Also fails spec","path":"docs/jasmine-upgrade.md","position":68,"original_position":68,"commit_id":"66ce7d6b76f94d3a584b351af6c42f4edf07c5a6","original_commit_id":"66ce7d6b76f94d3a584b351af6c42f4edf07c5a6","user":{"login":"hankduan","id":1059345,"avatar_url":"https://avatars.githubusercontent.com/u/1059345?v=3","gravatar_id":"","url":"https://api.github.com/users/hankduan","html_url":"https://github.com/hankduan","followers_url":"https://api.github.com/users/hankduan/followers","following_url":"https://api.github.com/users/hankduan/following{/other_user}","gists_url":"https://api.github.com/users/hankduan/gists{/gist_id}","starred_url":"https://api.github.com/users/hankduan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hankduan/subscriptions","organizations_url":"https://api.github.com/users/hankduan/orgs","repos_url":"https://api.github.com/users/hankduan/repos","events_url":"https://api.github.com/users/hankduan/events{/privacy}","received_events_url":"https://api.github.com/users/hankduan/received_events","type":"User","site_admin":false},"body":"yes good catch. I didn't actually run the example, and it probably won't work. \r\nI'm just going to remove the reference to `this.fail` since it feels more consistent to use `done.fail` anyway","created_at":"2015-01-02T23:31:35Z","updated_at":"2015-01-02T23:31:35Z","html_url":"https://github.com/angular/protractor/pull/1679#discussion_r22426717","pull_request_url":"https://api.github.com/repos/angular/protractor/pulls/1679","_links":{"self":{"href":"https://api.github.com/repos/angular/protractor/pulls/comments/22426717"},"html":{"href":"https://github.com/angular/protractor/pull/1679#discussion_r22426717"},"pull_request":{"href":"https://api.github.com/repos/angular/protractor/pulls/1679"}}},"pull_request":{"url":"https://api.github.com/repos/angular/protractor/pulls/1679","id":26767370,"html_url":"https://github.com/angular/protractor/pull/1679","diff_url":"https://github.com/angular/protractor/pull/1679.diff","patch_url":"https://github.com/angular/protractor/pull/1679.patch","issue_url":"https://api.github.com/repos/angular/protractor/issues/1679","number":1679,"state":"open","locked":false,"title":"docs(jasmine-upgrade): add docs for upgrading jasmine from 1.3 to 2.0","user":{"login":"hankduan","id":1059345,"avatar_url":"https://avatars.githubusercontent.com/u/1059345?v=3","gravatar_id":"","url":"https://api.github.com/users/hankduan","html_url":"https://github.com/hankduan","followers_url":"https://api.github.com/users/hankduan/followers","following_url":"https://api.github.com/users/hankduan/following{/other_user}","gists_url":"https://api.github.com/users/hankduan/gists{/gist_id}","starred_url":"https://api.github.com/users/hankduan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hankduan/subscriptions","organizations_url":"https://api.github.com/users/hankduan/orgs","repos_url":"https://api.github.com/users/hankduan/repos","events_url":"https://api.github.com/users/hankduan/events{/privacy}","received_events_url":"https://api.github.com/users/hankduan/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-02T19:15:35Z","updated_at":"2015-01-02T23:31:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"201f54ea7da0ba3c7230e15ef1665ca1c3f828a3","assignee":{"login":"juliemr","id":2081709,"avatar_url":"https://avatars.githubusercontent.com/u/2081709?v=3","gravatar_id":"","url":"https://api.github.com/users/juliemr","html_url":"https://github.com/juliemr","followers_url":"https://api.github.com/users/juliemr/followers","following_url":"https://api.github.com/users/juliemr/following{/other_user}","gists_url":"https://api.github.com/users/juliemr/gists{/gist_id}","starred_url":"https://api.github.com/users/juliemr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliemr/subscriptions","organizations_url":"https://api.github.com/users/juliemr/orgs","repos_url":"https://api.github.com/users/juliemr/repos","events_url":"https://api.github.com/users/juliemr/events{/privacy}","received_events_url":"https://api.github.com/users/juliemr/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/angular/protractor/pulls/1679/commits","review_comments_url":"https://api.github.com/repos/angular/protractor/pulls/1679/comments","review_comment_url":"https://api.github.com/repos/angular/protractor/pulls/comments/{number}","comments_url":"https://api.github.com/repos/angular/protractor/issues/1679/comments","statuses_url":"https://api.github.com/repos/angular/protractor/statuses/66ce7d6b76f94d3a584b351af6c42f4edf07c5a6","head":{"label":"hankduan:jasmine-upgrade-doc","ref":"jasmine-upgrade-doc","sha":"66ce7d6b76f94d3a584b351af6c42f4edf07c5a6","user":{"login":"hankduan","id":1059345,"avatar_url":"https://avatars.githubusercontent.com/u/1059345?v=3","gravatar_id":"","url":"https://api.github.com/users/hankduan","html_url":"https://github.com/hankduan","followers_url":"https://api.github.com/users/hankduan/followers","following_url":"https://api.github.com/users/hankduan/following{/other_user}","gists_url":"https://api.github.com/users/hankduan/gists{/gist_id}","starred_url":"https://api.github.com/users/hankduan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hankduan/subscriptions","organizations_url":"https://api.github.com/users/hankduan/orgs","repos_url":"https://api.github.com/users/hankduan/repos","events_url":"https://api.github.com/users/hankduan/events{/privacy}","received_events_url":"https://api.github.com/users/hankduan/received_events","type":"User","site_admin":false},"repo":{"id":18743630,"name":"protractor","full_name":"hankduan/protractor","owner":{"login":"hankduan","id":1059345,"avatar_url":"https://avatars.githubusercontent.com/u/1059345?v=3","gravatar_id":"","url":"https://api.github.com/users/hankduan","html_url":"https://github.com/hankduan","followers_url":"https://api.github.com/users/hankduan/followers","following_url":"https://api.github.com/users/hankduan/following{/other_user}","gists_url":"https://api.github.com/users/hankduan/gists{/gist_id}","starred_url":"https://api.github.com/users/hankduan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hankduan/subscriptions","organizations_url":"https://api.github.com/users/hankduan/orgs","repos_url":"https://api.github.com/users/hankduan/repos","events_url":"https://api.github.com/users/hankduan/events{/privacy}","received_events_url":"https://api.github.com/users/hankduan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hankduan/protractor","description":"E2E test framework for Angular apps","fork":true,"url":"https://api.github.com/repos/hankduan/protractor","forks_url":"https://api.github.com/repos/hankduan/protractor/forks","keys_url":"https://api.github.com/repos/hankduan/protractor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hankduan/protractor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hankduan/protractor/teams","hooks_url":"https://api.github.com/repos/hankduan/protractor/hooks","issue_events_url":"https://api.github.com/repos/hankduan/protractor/issues/events{/number}","events_url":"https://api.github.com/repos/hankduan/protractor/events","assignees_url":"https://api.github.com/repos/hankduan/protractor/assignees{/user}","branches_url":"https://api.github.com/repos/hankduan/protractor/branches{/branch}","tags_url":"https://api.github.com/repos/hankduan/protractor/tags","blobs_url":"https://api.github.com/repos/hankduan/protractor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hankduan/protractor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hankduan/protractor/git/refs{/sha}","trees_url":"https://api.github.com/repos/hankduan/protractor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hankduan/protractor/statuses/{sha}","languages_url":"https://api.github.com/repos/hankduan/protractor/languages","stargazers_url":"https://api.github.com/repos/hankduan/protractor/stargazers","contributors_url":"https://api.github.com/repos/hankduan/protractor/contributors","subscribers_url":"https://api.github.com/repos/hankduan/protractor/subscribers","subscription_url":"https://api.github.com/repos/hankduan/protractor/subscription","commits_url":"https://api.github.com/repos/hankduan/protractor/commits{/sha}","git_commits_url":"https://api.github.com/repos/hankduan/protractor/git/commits{/sha}","comments_url":"https://api.github.com/repos/hankduan/protractor/comments{/number}","issue_comment_url":"https://api.github.com/repos/hankduan/protractor/issues/comments/{number}","contents_url":"https://api.github.com/repos/hankduan/protractor/contents/{+path}","compare_url":"https://api.github.com/repos/hankduan/protractor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hankduan/protractor/merges","archive_url":"https://api.github.com/repos/hankduan/protractor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hankduan/protractor/downloads","issues_url":"https://api.github.com/repos/hankduan/protractor/issues{/number}","pulls_url":"https://api.github.com/repos/hankduan/protractor/pulls{/number}","milestones_url":"https://api.github.com/repos/hankduan/protractor/milestones{/number}","notifications_url":"https://api.github.com/repos/hankduan/protractor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hankduan/protractor/labels{/name}","releases_url":"https://api.github.com/repos/hankduan/protractor/releases{/id}","created_at":"2014-04-14T00:28:37Z","updated_at":"2014-12-31T00:39:38Z","pushed_at":"2015-01-02T19:14:53Z","git_url":"git://github.com/hankduan/protractor.git","ssh_url":"git@github.com:hankduan/protractor.git","clone_url":"https://github.com/hankduan/protractor.git","svn_url":"https://github.com/hankduan/protractor","homepage":null,"size":3696,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"0a1f77021449fe9f2ec1011c4dfb1b95ed2190ff","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":7639232,"name":"protractor","full_name":"angular/protractor","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/protractor","description":"E2E test framework for Angular apps","fork":false,"url":"https://api.github.com/repos/angular/protractor","forks_url":"https://api.github.com/repos/angular/protractor/forks","keys_url":"https://api.github.com/repos/angular/protractor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/protractor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/protractor/teams","hooks_url":"https://api.github.com/repos/angular/protractor/hooks","issue_events_url":"https://api.github.com/repos/angular/protractor/issues/events{/number}","events_url":"https://api.github.com/repos/angular/protractor/events","assignees_url":"https://api.github.com/repos/angular/protractor/assignees{/user}","branches_url":"https://api.github.com/repos/angular/protractor/branches{/branch}","tags_url":"https://api.github.com/repos/angular/protractor/tags","blobs_url":"https://api.github.com/repos/angular/protractor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/protractor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/protractor/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/protractor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/protractor/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/protractor/languages","stargazers_url":"https://api.github.com/repos/angular/protractor/stargazers","contributors_url":"https://api.github.com/repos/angular/protractor/contributors","subscribers_url":"https://api.github.com/repos/angular/protractor/subscribers","subscription_url":"https://api.github.com/repos/angular/protractor/subscription","commits_url":"https://api.github.com/repos/angular/protractor/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/protractor/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/protractor/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/protractor/issues/comments/{number}","contents_url":"https://api.github.com/repos/angular/protractor/contents/{+path}","compare_url":"https://api.github.com/repos/angular/protractor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/protractor/merges","archive_url":"https://api.github.com/repos/angular/protractor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/protractor/downloads","issues_url":"https://api.github.com/repos/angular/protractor/issues{/number}","pulls_url":"https://api.github.com/repos/angular/protractor/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/protractor/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/protractor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/protractor/labels{/name}","releases_url":"https://api.github.com/repos/angular/protractor/releases{/id}","created_at":"2013-01-16T04:30:53Z","updated_at":"2015-01-02T15:40:38Z","pushed_at":"2014-12-30T20:28:57Z","git_url":"git://github.com/angular/protractor.git","ssh_url":"git@github.com:angular/protractor.git","clone_url":"https://github.com/angular/protractor.git","svn_url":"https://github.com/angular/protractor","homepage":"http://www.protractortest.org","size":9641,"stargazers_count":3045,"watchers_count":3045,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":580,"mirror_url":null,"open_issues_count":129,"forks":580,"open_issues":129,"watchers":3045,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/protractor/pulls/1679"},"html":{"href":"https://github.com/angular/protractor/pull/1679"},"issue":{"href":"https://api.github.com/repos/angular/protractor/issues/1679"},"comments":{"href":"https://api.github.com/repos/angular/protractor/issues/1679/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/protractor/pulls/1679/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/protractor/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/angular/protractor/pulls/1679/commits"},"statuses":{"href":"https://api.github.com/repos/angular/protractor/statuses/66ce7d6b76f94d3a584b351af6c42f4edf07c5a6"}}}}