{"action":"created","comment":{"url":"https://api.github.com/repos/dojo/stores/pulls/comments/85992302","pull_request_review_id":6673929,"id":85992302,"diff_hunk":"@@ -370,5 +380,80 @@ registerSuite({\n \t\t\t\tassert.deepEqual(result, ids, 'Should have returned all deleted ids');\n \t\t\t}).then(dfd.resolve);\n \t\t}\n+\t},\n+\n+\t'async storage': {\n+\t\t'async operation should not be done immediately.'(this: any) {\n+\t\t\tconst{ dfd, store } = getStoreWithAsyncStorage(this, { put: 21 });\n+\n+\t\t\tconst start = Date.now();\n+\t\t\tstore.add(createData()).then(dfd.callback(function(result: ItemType[]) {\n+\t\t\t\tconst finish = Date.now();\n+\t\t\t\tassert.isAbove(finish - start, 19 );\n+\t\t\t\tdfd.resolve();\n+\t\t\t}));\n+\t\t},\n+\t\t'should complete initial add before subsequent operations'(this: any) {\n+\t\t\tconst dfd = this.async(1000);","path":"tests/unit/store/createStore.ts","position":49,"original_position":49,"commit_id":"2cfdf07acce017d162acc4647eaf60f3a8f25043","original_commit_id":"7e010697e9cd92aa8aa16f5097d70c64e240e0a9","user":{"login":"lzhoucs","id":1444104,"avatar_url":"https://avatars.githubusercontent.com/u/1444104?v=3","gravatar_id":"","url":"https://api.github.com/users/lzhoucs","html_url":"https://github.com/lzhoucs","followers_url":"https://api.github.com/users/lzhoucs/followers","following_url":"https://api.github.com/users/lzhoucs/following{/other_user}","gists_url":"https://api.github.com/users/lzhoucs/gists{/gist_id}","starred_url":"https://api.github.com/users/lzhoucs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzhoucs/subscriptions","organizations_url":"https://api.github.com/users/lzhoucs/orgs","repos_url":"https://api.github.com/users/lzhoucs/repos","events_url":"https://api.github.com/users/lzhoucs/events{/privacy}","received_events_url":"https://api.github.com/users/lzhoucs/received_events","type":"User","site_admin":false},"body":"For simpler tests like this one, returning a promise is enough. `this.async` used here is for consistency with other places where using `const dfd = this.async(1000);` is necessary. For example, we have a[ bunch of tests](https://github.com/dojo/stores/blob/master/tests/unit/store/mixins/createObservableStoreMixin.ts#L177-L195) that verifies a series of returned value over time. \r\n\r\nBasically this approach allows us to have finer-grained control over test flow.  Also `this.async()` allows us to override the default timeout `30000`.","created_at":"2016-11-01T18:24:18Z","updated_at":"2016-11-01T18:53:41Z","html_url":"https://github.com/dojo/stores/pull/31#discussion_r85992302","pull_request_url":"https://api.github.com/repos/dojo/stores/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/dojo/stores/pulls/comments/85992302"},"html":{"href":"https://github.com/dojo/stores/pull/31#discussion_r85992302"},"pull_request":{"href":"https://api.github.com/repos/dojo/stores/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/dojo/stores/pulls/31","id":90414390,"html_url":"https://github.com/dojo/stores/pull/31","diff_url":"https://github.com/dojo/stores/pull/31.diff","patch_url":"https://github.com/dojo/stores/pull/31.patch","issue_url":"https://api.github.com/repos/dojo/stores/issues/31","number":31,"state":"open","locked":false,"title":"Add tests and fixes for store asynchronous behaviors","user":{"login":"lzhoucs","id":1444104,"avatar_url":"https://avatars.githubusercontent.com/u/1444104?v=3","gravatar_id":"","url":"https://api.github.com/users/lzhoucs","html_url":"https://github.com/lzhoucs","followers_url":"https://api.github.com/users/lzhoucs/followers","following_url":"https://api.github.com/users/lzhoucs/following{/other_user}","gists_url":"https://api.github.com/users/lzhoucs/gists{/gist_id}","starred_url":"https://api.github.com/users/lzhoucs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzhoucs/subscriptions","organizations_url":"https://api.github.com/users/lzhoucs/orgs","repos_url":"https://api.github.com/users/lzhoucs/repos","events_url":"https://api.github.com/users/lzhoucs/events{/privacy}","received_events_url":"https://api.github.com/users/lzhoucs/received_events","type":"User","site_admin":false},"body":"**Bug fixes and Tests**\n\n**Description:** \n- Add a simple async storage and unit tests to test store async behaviors.\n- Bug fixes.\n\n**Related Issue:** #30 \n\nPlease review this checklist before submitting your PR:\n- [x] There is a related issue\n- [x] All contributors have signed a CLA\n- [ ] All code matches the [style guide](https://github.com/dojo/meta/blob/master/STYLE.md)\n- [x] The code passes the CI tests\n- [x] Unit or Functional tests are included in the PR\n- [x] The PR increases or maintains the overall unit test coverage percentage\n- [x] The code is ready to be merged\n","created_at":"2016-10-21T16:41:35Z","updated_at":"2016-11-01T18:53:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aeea7d87203df3d88323b82036e8be455bff06b9","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dojo/stores/milestones/7","html_url":"https://github.com/dojo/stores/milestones/2016.10","labels_url":"https://api.github.com/repos/dojo/stores/milestones/7/labels","id":1862841,"number":7,"title":"2016.10","description":"","creator":{"login":"kitsonk","id":1282577,"avatar_url":"https://avatars.githubusercontent.com/u/1282577?v=3","gravatar_id":"","url":"https://api.github.com/users/kitsonk","html_url":"https://github.com/kitsonk","followers_url":"https://api.github.com/users/kitsonk/followers","following_url":"https://api.github.com/users/kitsonk/following{/other_user}","gists_url":"https://api.github.com/users/kitsonk/gists{/gist_id}","starred_url":"https://api.github.com/users/kitsonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kitsonk/subscriptions","organizations_url":"https://api.github.com/users/kitsonk/orgs","repos_url":"https://api.github.com/users/kitsonk/repos","events_url":"https://api.github.com/users/kitsonk/events{/privacy}","received_events_url":"https://api.github.com/users/kitsonk/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":9,"state":"open","created_at":"2016-07-04T09:10:08Z","updated_at":"2016-11-01T16:10:30Z","due_on":"2016-10-31T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/dojo/stores/pulls/31/commits","review_comments_url":"https://api.github.com/repos/dojo/stores/pulls/31/comments","review_comment_url":"https://api.github.com/repos/dojo/stores/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dojo/stores/issues/31/comments","statuses_url":"https://api.github.com/repos/dojo/stores/statuses/2cfdf07acce017d162acc4647eaf60f3a8f25043","head":{"label":"lzhoucs:async-tests","ref":"async-tests","sha":"2cfdf07acce017d162acc4647eaf60f3a8f25043","user":{"login":"lzhoucs","id":1444104,"avatar_url":"https://avatars.githubusercontent.com/u/1444104?v=3","gravatar_id":"","url":"https://api.github.com/users/lzhoucs","html_url":"https://github.com/lzhoucs","followers_url":"https://api.github.com/users/lzhoucs/followers","following_url":"https://api.github.com/users/lzhoucs/following{/other_user}","gists_url":"https://api.github.com/users/lzhoucs/gists{/gist_id}","starred_url":"https://api.github.com/users/lzhoucs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzhoucs/subscriptions","organizations_url":"https://api.github.com/users/lzhoucs/orgs","repos_url":"https://api.github.com/users/lzhoucs/repos","events_url":"https://api.github.com/users/lzhoucs/events{/privacy}","received_events_url":"https://api.github.com/users/lzhoucs/received_events","type":"User","site_admin":false},"repo":{"id":70674150,"name":"stores","full_name":"lzhoucs/stores","owner":{"login":"lzhoucs","id":1444104,"avatar_url":"https://avatars.githubusercontent.com/u/1444104?v=3","gravatar_id":"","url":"https://api.github.com/users/lzhoucs","html_url":"https://github.com/lzhoucs","followers_url":"https://api.github.com/users/lzhoucs/followers","following_url":"https://api.github.com/users/lzhoucs/following{/other_user}","gists_url":"https://api.github.com/users/lzhoucs/gists{/gist_id}","starred_url":"https://api.github.com/users/lzhoucs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzhoucs/subscriptions","organizations_url":"https://api.github.com/users/lzhoucs/orgs","repos_url":"https://api.github.com/users/lzhoucs/repos","events_url":"https://api.github.com/users/lzhoucs/events{/privacy}","received_events_url":"https://api.github.com/users/lzhoucs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lzhoucs/stores","description":":rocket: Data stores for Dojo 2.","fork":true,"url":"https://api.github.com/repos/lzhoucs/stores","forks_url":"https://api.github.com/repos/lzhoucs/stores/forks","keys_url":"https://api.github.com/repos/lzhoucs/stores/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lzhoucs/stores/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lzhoucs/stores/teams","hooks_url":"https://api.github.com/repos/lzhoucs/stores/hooks","issue_events_url":"https://api.github.com/repos/lzhoucs/stores/issues/events{/number}","events_url":"https://api.github.com/repos/lzhoucs/stores/events","assignees_url":"https://api.github.com/repos/lzhoucs/stores/assignees{/user}","branches_url":"https://api.github.com/repos/lzhoucs/stores/branches{/branch}","tags_url":"https://api.github.com/repos/lzhoucs/stores/tags","blobs_url":"https://api.github.com/repos/lzhoucs/stores/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lzhoucs/stores/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lzhoucs/stores/git/refs{/sha}","trees_url":"https://api.github.com/repos/lzhoucs/stores/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lzhoucs/stores/statuses/{sha}","languages_url":"https://api.github.com/repos/lzhoucs/stores/languages","stargazers_url":"https://api.github.com/repos/lzhoucs/stores/stargazers","contributors_url":"https://api.github.com/repos/lzhoucs/stores/contributors","subscribers_url":"https://api.github.com/repos/lzhoucs/stores/subscribers","subscription_url":"https://api.github.com/repos/lzhoucs/stores/subscription","commits_url":"https://api.github.com/repos/lzhoucs/stores/commits{/sha}","git_commits_url":"https://api.github.com/repos/lzhoucs/stores/git/commits{/sha}","comments_url":"https://api.github.com/repos/lzhoucs/stores/comments{/number}","issue_comment_url":"https://api.github.com/repos/lzhoucs/stores/issues/comments{/number}","contents_url":"https://api.github.com/repos/lzhoucs/stores/contents/{+path}","compare_url":"https://api.github.com/repos/lzhoucs/stores/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lzhoucs/stores/merges","archive_url":"https://api.github.com/repos/lzhoucs/stores/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lzhoucs/stores/downloads","issues_url":"https://api.github.com/repos/lzhoucs/stores/issues{/number}","pulls_url":"https://api.github.com/repos/lzhoucs/stores/pulls{/number}","milestones_url":"https://api.github.com/repos/lzhoucs/stores/milestones{/number}","notifications_url":"https://api.github.com/repos/lzhoucs/stores/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lzhoucs/stores/labels{/name}","releases_url":"https://api.github.com/repos/lzhoucs/stores/releases{/id}","deployments_url":"https://api.github.com/repos/lzhoucs/stores/deployments","created_at":"2016-10-12T07:23:44Z","updated_at":"2016-10-12T07:23:45Z","pushed_at":"2016-11-01T17:56:47Z","git_url":"git://github.com/lzhoucs/stores.git","ssh_url":"git@github.com:lzhoucs/stores.git","clone_url":"https://github.com/lzhoucs/stores.git","svn_url":"https://github.com/lzhoucs/stores","homepage":"","size":144,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"dojo:master","ref":"master","sha":"9e4dc41007657b2490a81ccd7aaa9c738bf54265","user":{"login":"dojo","id":86896,"avatar_url":"https://avatars.githubusercontent.com/u/86896?v=3","gravatar_id":"","url":"https://api.github.com/users/dojo","html_url":"https://github.com/dojo","followers_url":"https://api.github.com/users/dojo/followers","following_url":"https://api.github.com/users/dojo/following{/other_user}","gists_url":"https://api.github.com/users/dojo/gists{/gist_id}","starred_url":"https://api.github.com/users/dojo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dojo/subscriptions","organizations_url":"https://api.github.com/users/dojo/orgs","repos_url":"https://api.github.com/users/dojo/repos","events_url":"https://api.github.com/users/dojo/events{/privacy}","received_events_url":"https://api.github.com/users/dojo/received_events","type":"Organization","site_admin":false},"repo":{"id":55952101,"name":"stores","full_name":"dojo/stores","owner":{"login":"dojo","id":86896,"avatar_url":"https://avatars.githubusercontent.com/u/86896?v=3","gravatar_id":"","url":"https://api.github.com/users/dojo","html_url":"https://github.com/dojo","followers_url":"https://api.github.com/users/dojo/followers","following_url":"https://api.github.com/users/dojo/following{/other_user}","gists_url":"https://api.github.com/users/dojo/gists{/gist_id}","starred_url":"https://api.github.com/users/dojo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dojo/subscriptions","organizations_url":"https://api.github.com/users/dojo/orgs","repos_url":"https://api.github.com/users/dojo/repos","events_url":"https://api.github.com/users/dojo/events{/privacy}","received_events_url":"https://api.github.com/users/dojo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dojo/stores","description":":rocket: Data stores for Dojo 2.","fork":false,"url":"https://api.github.com/repos/dojo/stores","forks_url":"https://api.github.com/repos/dojo/stores/forks","keys_url":"https://api.github.com/repos/dojo/stores/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dojo/stores/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dojo/stores/teams","hooks_url":"https://api.github.com/repos/dojo/stores/hooks","issue_events_url":"https://api.github.com/repos/dojo/stores/issues/events{/number}","events_url":"https://api.github.com/repos/dojo/stores/events","assignees_url":"https://api.github.com/repos/dojo/stores/assignees{/user}","branches_url":"https://api.github.com/repos/dojo/stores/branches{/branch}","tags_url":"https://api.github.com/repos/dojo/stores/tags","blobs_url":"https://api.github.com/repos/dojo/stores/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dojo/stores/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dojo/stores/git/refs{/sha}","trees_url":"https://api.github.com/repos/dojo/stores/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dojo/stores/statuses/{sha}","languages_url":"https://api.github.com/repos/dojo/stores/languages","stargazers_url":"https://api.github.com/repos/dojo/stores/stargazers","contributors_url":"https://api.github.com/repos/dojo/stores/contributors","subscribers_url":"https://api.github.com/repos/dojo/stores/subscribers","subscription_url":"https://api.github.com/repos/dojo/stores/subscription","commits_url":"https://api.github.com/repos/dojo/stores/commits{/sha}","git_commits_url":"https://api.github.com/repos/dojo/stores/git/commits{/sha}","comments_url":"https://api.github.com/repos/dojo/stores/comments{/number}","issue_comment_url":"https://api.github.com/repos/dojo/stores/issues/comments{/number}","contents_url":"https://api.github.com/repos/dojo/stores/contents/{+path}","compare_url":"https://api.github.com/repos/dojo/stores/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dojo/stores/merges","archive_url":"https://api.github.com/repos/dojo/stores/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dojo/stores/downloads","issues_url":"https://api.github.com/repos/dojo/stores/issues{/number}","pulls_url":"https://api.github.com/repos/dojo/stores/pulls{/number}","milestones_url":"https://api.github.com/repos/dojo/stores/milestones{/number}","notifications_url":"https://api.github.com/repos/dojo/stores/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dojo/stores/labels{/name}","releases_url":"https://api.github.com/repos/dojo/stores/releases{/id}","deployments_url":"https://api.github.com/repos/dojo/stores/deployments","created_at":"2016-04-11T07:46:15Z","updated_at":"2016-10-31T12:16:53Z","pushed_at":"2016-11-01T17:56:47Z","git_url":"git://github.com/dojo/stores.git","ssh_url":"git@github.com:dojo/stores.git","clone_url":"https://github.com/dojo/stores.git","svn_url":"https://github.com/dojo/stores","homepage":"","size":316,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":23,"forks":7,"open_issues":23,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dojo/stores/pulls/31"},"html":{"href":"https://github.com/dojo/stores/pull/31"},"issue":{"href":"https://api.github.com/repos/dojo/stores/issues/31"},"comments":{"href":"https://api.github.com/repos/dojo/stores/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/dojo/stores/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/dojo/stores/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dojo/stores/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/dojo/stores/statuses/2cfdf07acce017d162acc4647eaf60f3a8f25043"}}}}
{"actor":{"display_login":"lzhoucs"}}