{"action":"created","comment":{"url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/comments/166529739","pull_request_review_id":94604259,"id":166529739,"diff_hunk":"@@ -0,0 +1,60 @@\n+/*\n+ Copyright (c) 2018-present, salesforce.com, inc. All rights reserved.\n+ \n+ Redistribution and use of this software in source and binary forms, with or without modification,\n+ are permitted provided that the following conditions are met:\n+ * Redistributions of source code must retain the above copyright notice, this list of conditions\n+ and the following disclaimer.\n+ * Redistributions in binary form must reproduce the above copyright notice, this list of\n+ conditions and the following disclaimer in the documentation and/or other materials provided\n+ with the distribution.\n+ * Neither the name of salesforce.com, inc. nor the names of its contributors may be used to\n+ endorse or promote products derived from this software without specific prior written\n+ permission of salesforce.com, inc.\n+ \n+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY\n+ WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+","path":"libs/SalesforceReact/SalesforceReactTests/ReactTestCase.h","position":24,"original_position":24,"commit_id":"2827eeeb94df3952757c9c9642cce21a1b184b08","original_commit_id":"2827eeeb94df3952757c9c9642cce21a1b184b08","user":{"login":"wmathurin","id":1012459,"avatar_url":"https://avatars0.githubusercontent.com/u/1012459?v=4","gravatar_id":"","url":"https://api.github.com/users/wmathurin","html_url":"https://github.com/wmathurin","followers_url":"https://api.github.com/users/wmathurin/followers","following_url":"https://api.github.com/users/wmathurin/following{/other_user}","gists_url":"https://api.github.com/users/wmathurin/gists{/gist_id}","starred_url":"https://api.github.com/users/wmathurin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmathurin/subscriptions","organizations_url":"https://api.github.com/users/wmathurin/orgs","repos_url":"https://api.github.com/users/wmathurin/repos","events_url":"https://api.github.com/users/wmathurin/events{/privacy}","received_events_url":"https://api.github.com/users/wmathurin/received_events","type":"User","site_admin":false},"body":"Below is the `if defined` that I should not have to put in.","created_at":"2018-02-07T06:42:19Z","updated_at":"2018-02-07T06:42:19Z","html_url":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS/pull/2397#discussion_r166529739","pull_request_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/2397","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/comments/166529739"},"html":{"href":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS/pull/2397#discussion_r166529739"},"pull_request":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/2397"}}},"pull_request":{"url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/2397","id":167608592,"html_url":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS/pull/2397","diff_url":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS/pull/2397.diff","patch_url":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS/pull/2397.patch","issue_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/issues/2397","number":2397,"state":"open","locked":false,"title":"Tests for react native bridges","user":{"login":"wmathurin","id":1012459,"avatar_url":"https://avatars0.githubusercontent.com/u/1012459?v=4","gravatar_id":"","url":"https://api.github.com/users/wmathurin","html_url":"https://github.com/wmathurin","followers_url":"https://api.github.com/users/wmathurin/followers","following_url":"https://api.github.com/users/wmathurin/following{/other_user}","gists_url":"https://api.github.com/users/wmathurin/gists{/gist_id}","starred_url":"https://api.github.com/users/wmathurin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmathurin/subscriptions","organizations_url":"https://api.github.com/users/wmathurin/orgs","repos_url":"https://api.github.com/users/wmathurin/repos","events_url":"https://api.github.com/users/wmathurin/events{/privacy}","received_events_url":"https://api.github.com/users/wmathurin/received_events","type":"User","site_admin":false},"body":"1) **react native is pulled in through npm** (instead of a submodule) => that was required since we now run react native code (in tests) and therefore need all the javascript npm dependencies.\r\n2) **leveraging RCTTestRunner** which expects a component by test => made it painless with some helper code (see `ReactTestCase.m` and `react.force.test.js`).\r\n3) **the javascript code should move to the SalesforceMobileSDK-ReactNative** repo => will do that when working on the corresponding Android story\r\n4) after every test, RCTTestRunner tears down everything and make sure that the RCTBridge has been deallocated, as a result, **retain cycles in the code cause test failures**. When working on `testCleanResyncGhosts`, **I found and fixed fixed memory leaks in the clean ghosts code**.","created_at":"2018-02-07T06:29:53Z","updated_at":"2018-02-07T06:42:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16053d3fd2dad49aebe3ef253eda0ce95e4fd252","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/2397/commits","review_comments_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/2397/comments","review_comment_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/issues/2397/comments","statuses_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/statuses/2827eeeb94df3952757c9c9642cce21a1b184b08","head":{"label":"wmathurin:reacttests","ref":"reacttests","sha":"2827eeeb94df3952757c9c9642cce21a1b184b08","user":{"login":"wmathurin","id":1012459,"avatar_url":"https://avatars0.githubusercontent.com/u/1012459?v=4","gravatar_id":"","url":"https://api.github.com/users/wmathurin","html_url":"https://github.com/wmathurin","followers_url":"https://api.github.com/users/wmathurin/followers","following_url":"https://api.github.com/users/wmathurin/following{/other_user}","gists_url":"https://api.github.com/users/wmathurin/gists{/gist_id}","starred_url":"https://api.github.com/users/wmathurin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmathurin/subscriptions","organizations_url":"https://api.github.com/users/wmathurin/orgs","repos_url":"https://api.github.com/users/wmathurin/repos","events_url":"https://api.github.com/users/wmathurin/events{/privacy}","received_events_url":"https://api.github.com/users/wmathurin/received_events","type":"User","site_admin":false},"repo":{"id":5184198,"name":"SalesforceMobileSDK-iOS","full_name":"wmathurin/SalesforceMobileSDK-iOS","owner":{"login":"wmathurin","id":1012459,"avatar_url":"https://avatars0.githubusercontent.com/u/1012459?v=4","gravatar_id":"","url":"https://api.github.com/users/wmathurin","html_url":"https://github.com/wmathurin","followers_url":"https://api.github.com/users/wmathurin/followers","following_url":"https://api.github.com/users/wmathurin/following{/other_user}","gists_url":"https://api.github.com/users/wmathurin/gists{/gist_id}","starred_url":"https://api.github.com/users/wmathurin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmathurin/subscriptions","organizations_url":"https://api.github.com/users/wmathurin/orgs","repos_url":"https://api.github.com/users/wmathurin/repos","events_url":"https://api.github.com/users/wmathurin/events{/privacy}","received_events_url":"https://api.github.com/users/wmathurin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wmathurin/SalesforceMobileSDK-iOS","description":"Force.com mobile SDK for iOS applications","fork":true,"url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS","forks_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/forks","keys_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/teams","hooks_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/hooks","issue_events_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/events","assignees_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/tags","blobs_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/languages","stargazers_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/stargazers","contributors_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/contributors","subscribers_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/subscribers","subscription_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/subscription","commits_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/merges","archive_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/downloads","issues_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/labels{/name}","releases_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/deployments","created_at":"2012-07-25T20:31:23Z","updated_at":"2015-04-27T23:06:59Z","pushed_at":"2018-02-07T06:13:55Z","git_url":"git://github.com/wmathurin/SalesforceMobileSDK-iOS.git","ssh_url":"git@github.com:wmathurin/SalesforceMobileSDK-iOS.git","clone_url":"https://github.com/wmathurin/SalesforceMobileSDK-iOS.git","svn_url":"https://github.com/wmathurin/SalesforceMobileSDK-iOS","homepage":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS","size":358977,"stargazers_count":1,"watchers_count":1,"language":"Objective-C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"forcedotcom:dev","ref":"dev","sha":"5b2450512bcdcbc422d2e5e9a98916adb2b5fa72","user":{"login":"forcedotcom","id":464563,"avatar_url":"https://avatars3.githubusercontent.com/u/464563?v=4","gravatar_id":"","url":"https://api.github.com/users/forcedotcom","html_url":"https://github.com/forcedotcom","followers_url":"https://api.github.com/users/forcedotcom/followers","following_url":"https://api.github.com/users/forcedotcom/following{/other_user}","gists_url":"https://api.github.com/users/forcedotcom/gists{/gist_id}","starred_url":"https://api.github.com/users/forcedotcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forcedotcom/subscriptions","organizations_url":"https://api.github.com/users/forcedotcom/orgs","repos_url":"https://api.github.com/users/forcedotcom/repos","events_url":"https://api.github.com/users/forcedotcom/events{/privacy}","received_events_url":"https://api.github.com/users/forcedotcom/received_events","type":"Organization","site_admin":false},"repo":{"id":2338086,"name":"SalesforceMobileSDK-iOS","full_name":"forcedotcom/SalesforceMobileSDK-iOS","owner":{"login":"forcedotcom","id":464563,"avatar_url":"https://avatars3.githubusercontent.com/u/464563?v=4","gravatar_id":"","url":"https://api.github.com/users/forcedotcom","html_url":"https://github.com/forcedotcom","followers_url":"https://api.github.com/users/forcedotcom/followers","following_url":"https://api.github.com/users/forcedotcom/following{/other_user}","gists_url":"https://api.github.com/users/forcedotcom/gists{/gist_id}","starred_url":"https://api.github.com/users/forcedotcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forcedotcom/subscriptions","organizations_url":"https://api.github.com/users/forcedotcom/orgs","repos_url":"https://api.github.com/users/forcedotcom/repos","events_url":"https://api.github.com/users/forcedotcom/events{/privacy}","received_events_url":"https://api.github.com/users/forcedotcom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS","description":"Force.com mobile SDK for iOS applications","fork":false,"url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS","forks_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/forks","keys_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/teams","hooks_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/hooks","issue_events_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/events","assignees_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/tags","blobs_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/languages","stargazers_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/stargazers","contributors_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/contributors","subscribers_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/subscribers","subscription_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/subscription","commits_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/merges","archive_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/downloads","issues_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/labels{/name}","releases_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/deployments","created_at":"2011-09-06T23:13:57Z","updated_at":"2018-01-22T13:26:40Z","pushed_at":"2018-02-07T06:29:54Z","git_url":"git://github.com/forcedotcom/SalesforceMobileSDK-iOS.git","ssh_url":"git@github.com:forcedotcom/SalesforceMobileSDK-iOS.git","clone_url":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS.git","svn_url":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS","homepage":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS","size":381044,"stargazers_count":373,"watchers_count":373,"language":"Objective-C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":301,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":301,"open_issues":7,"watchers":373,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/2397"},"html":{"href":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS/pull/2397"},"issue":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/issues/2397"},"comments":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/issues/2397/comments"},"review_comments":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/2397/comments"},"review_comment":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/2397/commits"},"statuses":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/statuses/2827eeeb94df3952757c9c9642cce21a1b184b08"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"wmathurin"}}