{"action":"created","comment":{"url":"https://api.github.com/repos/jquery/qunit/pulls/comments/81459645","pull_request_review_id":2440034,"id":81459645,"diff_hunk":"@@ -0,0 +1,64 @@\n+var lastTest = \"\",\n+\tdone = false,\n+\tmockStorage = {\n+\t\t_store: Object.create( null ),\n+\t\tsetItem: function( key, value ) {\n+\t\t\tthis._store[ key ] = value;\n+\t\t\tthis.length++;\n+\t\t},\n+\t\tgetItem: function( key ) {\n+\t\t\treturn key in this._store ? this._store[ key ] : null;\n+\t\t},\n+\t\tremoveItem: function( key ) {\n+\t\t\tif ( key in this._store ) {\n+\t\t\t\tdelete this._store[ key ];\n+\t\t\t\tthis.length--;\n+\t\t\t}\n+\t\t},\n+\t\tkey: function( i ) {\n+\t\t\treturn Object.keys( this._store )[ i ];\n+\t\t},\n+\t\tlength: 0\n+\t};\n+\n+mockStorage.setItem( \"qunit-test-Storage-Should be run first\", 1 );\n+QUnit.config.storage = mockStorage;\n+\n+QUnit.module( \"Storage\", function() {\n+\tQUnit.test( \"Passing test\", function( assert ) {\n+\t\tassert.strictEqual( lastTest, \"Should be run first\" );\n+\t\tmockStorage.setItem( \"qunit-test-Storage-Passing test\", true );\n+\t\tassert.ok( true );\n+\t} );\n+\n+\tQUnit.test( \"Removes passing tests from storage\", function( assert ) {\n+\t\tassert.strictEqual( mockStorage.getItem( \"qunit-test-Storage-Passing test\" ), null );\n+\t} );\n+\n+\t// Verifies test reordering by storage values\n+\tQUnit.test( \"Should be run first\", function( assert ) {\n+\t\tassert.strictEqual( lastTest, \"\" );\n+\t\tlastTest = \"Should be run first\";\n+\t} );\n+} );\n+\n+QUnit.done( function() {\n+\tif ( done ) {\n+\t\treturn;\n+\t}\n+\n+\tdone = true;\n+\n+\tmockStorage.setItem( \"qunit-test-should-remove\", true );\n+\tmockStorage.setItem( \"should-not-remove\", true );\n+\tmockStorage.setItem( \"qunit-test-should-also-remove\", true );\n+\n+\t// TODO: Is there a way to test this that will show up in CI?","path":"test/storage.js","position":56,"original_position":56,"commit_id":"7fbe2330d45dd1073b494fd5d25b449a500acda2","original_commit_id":"7fbe2330d45dd1073b494fd5d25b449a500acda2","user":{"login":"trentmwillis","id":3526753,"avatar_url":"https://avatars.githubusercontent.com/u/3526753?v=3","gravatar_id":"","url":"https://api.github.com/users/trentmwillis","html_url":"https://github.com/trentmwillis","followers_url":"https://api.github.com/users/trentmwillis/followers","following_url":"https://api.github.com/users/trentmwillis/following{/other_user}","gists_url":"https://api.github.com/users/trentmwillis/gists{/gist_id}","starred_url":"https://api.github.com/users/trentmwillis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trentmwillis/subscriptions","organizations_url":"https://api.github.com/users/trentmwillis/orgs","repos_url":"https://api.github.com/users/trentmwillis/repos","events_url":"https://api.github.com/users/trentmwillis/events{/privacy}","received_events_url":"https://api.github.com/users/trentmwillis/received_events","type":"User","site_admin":false},"body":"In order to test the clearing logic, we need to run assertions _after_ `done` has executed. Unfortunately, this involves using a `setTimeout` which doesn't seem to be reported properly when the tests run in Phantom (seems to work properly in Node land though). So, any suggestions to improve this would be beneficial.","created_at":"2016-10-01T22:23:02Z","updated_at":"2016-10-01T22:23:02Z","html_url":"https://github.com/jquery/qunit/pull/1055#discussion_r81459645","pull_request_url":"https://api.github.com/repos/jquery/qunit/pulls/1055","_links":{"self":{"href":"https://api.github.com/repos/jquery/qunit/pulls/comments/81459645"},"html":{"href":"https://github.com/jquery/qunit/pull/1055#discussion_r81459645"},"pull_request":{"href":"https://api.github.com/repos/jquery/qunit/pulls/1055"}}},"pull_request":{"url":"https://api.github.com/repos/jquery/qunit/pulls/1055","id":87592451,"html_url":"https://github.com/jquery/qunit/pull/1055","diff_url":"https://github.com/jquery/qunit/pull/1055.diff","patch_url":"https://github.com/jquery/qunit/pull/1055.patch","issue_url":"https://api.github.com/repos/jquery/qunit/issues/1055","number":1055,"state":"open","locked":false,"title":"Core: Introduce config.storage option","user":{"login":"trentmwillis","id":3526753,"avatar_url":"https://avatars.githubusercontent.com/u/3526753?v=3","gravatar_id":"","url":"https://api.github.com/users/trentmwillis","html_url":"https://github.com/trentmwillis","followers_url":"https://api.github.com/users/trentmwillis/followers","following_url":"https://api.github.com/users/trentmwillis/following{/other_user}","gists_url":"https://api.github.com/users/trentmwillis/gists{/gist_id}","starred_url":"https://api.github.com/users/trentmwillis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trentmwillis/subscriptions","organizations_url":"https://api.github.com/users/trentmwillis/orgs","repos_url":"https://api.github.com/users/trentmwillis/repos","events_url":"https://api.github.com/users/trentmwillis/events{/privacy}","received_events_url":"https://api.github.com/users/trentmwillis/received_events","type":"User","site_admin":false},"body":"Continuation of #1042 and #964.","created_at":"2016-10-01T05:31:37Z","updated_at":"2016-10-01T22:23:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b5299839b86f53304e35f3166f81b7cc646ef32f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jquery/qunit/pulls/1055/commits","review_comments_url":"https://api.github.com/repos/jquery/qunit/pulls/1055/comments","review_comment_url":"https://api.github.com/repos/jquery/qunit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jquery/qunit/issues/1055/comments","statuses_url":"https://api.github.com/repos/jquery/qunit/statuses/7fbe2330d45dd1073b494fd5d25b449a500acda2","head":{"label":"trentmwillis:session-storage","ref":"session-storage","sha":"7fbe2330d45dd1073b494fd5d25b449a500acda2","user":{"login":"trentmwillis","id":3526753,"avatar_url":"https://avatars.githubusercontent.com/u/3526753?v=3","gravatar_id":"","url":"https://api.github.com/users/trentmwillis","html_url":"https://github.com/trentmwillis","followers_url":"https://api.github.com/users/trentmwillis/followers","following_url":"https://api.github.com/users/trentmwillis/following{/other_user}","gists_url":"https://api.github.com/users/trentmwillis/gists{/gist_id}","starred_url":"https://api.github.com/users/trentmwillis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trentmwillis/subscriptions","organizations_url":"https://api.github.com/users/trentmwillis/orgs","repos_url":"https://api.github.com/users/trentmwillis/repos","events_url":"https://api.github.com/users/trentmwillis/events{/privacy}","received_events_url":"https://api.github.com/users/trentmwillis/received_events","type":"User","site_admin":false},"repo":{"id":48075616,"name":"qunit","full_name":"trentmwillis/qunit","owner":{"login":"trentmwillis","id":3526753,"avatar_url":"https://avatars.githubusercontent.com/u/3526753?v=3","gravatar_id":"","url":"https://api.github.com/users/trentmwillis","html_url":"https://github.com/trentmwillis","followers_url":"https://api.github.com/users/trentmwillis/followers","following_url":"https://api.github.com/users/trentmwillis/following{/other_user}","gists_url":"https://api.github.com/users/trentmwillis/gists{/gist_id}","starred_url":"https://api.github.com/users/trentmwillis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trentmwillis/subscriptions","organizations_url":"https://api.github.com/users/trentmwillis/orgs","repos_url":"https://api.github.com/users/trentmwillis/repos","events_url":"https://api.github.com/users/trentmwillis/events{/privacy}","received_events_url":"https://api.github.com/users/trentmwillis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/trentmwillis/qunit","description":"An easy-to-use JavaScript Unit Testing framework.","fork":true,"url":"https://api.github.com/repos/trentmwillis/qunit","forks_url":"https://api.github.com/repos/trentmwillis/qunit/forks","keys_url":"https://api.github.com/repos/trentmwillis/qunit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trentmwillis/qunit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trentmwillis/qunit/teams","hooks_url":"https://api.github.com/repos/trentmwillis/qunit/hooks","issue_events_url":"https://api.github.com/repos/trentmwillis/qunit/issues/events{/number}","events_url":"https://api.github.com/repos/trentmwillis/qunit/events","assignees_url":"https://api.github.com/repos/trentmwillis/qunit/assignees{/user}","branches_url":"https://api.github.com/repos/trentmwillis/qunit/branches{/branch}","tags_url":"https://api.github.com/repos/trentmwillis/qunit/tags","blobs_url":"https://api.github.com/repos/trentmwillis/qunit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trentmwillis/qunit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trentmwillis/qunit/git/refs{/sha}","trees_url":"https://api.github.com/repos/trentmwillis/qunit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trentmwillis/qunit/statuses/{sha}","languages_url":"https://api.github.com/repos/trentmwillis/qunit/languages","stargazers_url":"https://api.github.com/repos/trentmwillis/qunit/stargazers","contributors_url":"https://api.github.com/repos/trentmwillis/qunit/contributors","subscribers_url":"https://api.github.com/repos/trentmwillis/qunit/subscribers","subscription_url":"https://api.github.com/repos/trentmwillis/qunit/subscription","commits_url":"https://api.github.com/repos/trentmwillis/qunit/commits{/sha}","git_commits_url":"https://api.github.com/repos/trentmwillis/qunit/git/commits{/sha}","comments_url":"https://api.github.com/repos/trentmwillis/qunit/comments{/number}","issue_comment_url":"https://api.github.com/repos/trentmwillis/qunit/issues/comments{/number}","contents_url":"https://api.github.com/repos/trentmwillis/qunit/contents/{+path}","compare_url":"https://api.github.com/repos/trentmwillis/qunit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trentmwillis/qunit/merges","archive_url":"https://api.github.com/repos/trentmwillis/qunit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trentmwillis/qunit/downloads","issues_url":"https://api.github.com/repos/trentmwillis/qunit/issues{/number}","pulls_url":"https://api.github.com/repos/trentmwillis/qunit/pulls{/number}","milestones_url":"https://api.github.com/repos/trentmwillis/qunit/milestones{/number}","notifications_url":"https://api.github.com/repos/trentmwillis/qunit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trentmwillis/qunit/labels{/name}","releases_url":"https://api.github.com/repos/trentmwillis/qunit/releases{/id}","deployments_url":"https://api.github.com/repos/trentmwillis/qunit/deployments","created_at":"2015-12-15T23:48:01Z","updated_at":"2016-01-12T05:11:14Z","pushed_at":"2016-10-01T22:13:57Z","git_url":"git://github.com/trentmwillis/qunit.git","ssh_url":"git@github.com:trentmwillis/qunit.git","clone_url":"https://github.com/trentmwillis/qunit.git","svn_url":"https://github.com/trentmwillis/qunit","homepage":"http://qunitjs.com","size":1674,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"jquery:master","ref":"master","sha":"b581572bd9bae31eeb6f1048f4f9c829c7d6290f","user":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"repo":{"id":259691,"name":"qunit","full_name":"jquery/qunit","owner":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jquery/qunit","description":"An easy-to-use JavaScript Unit Testing framework.","fork":false,"url":"https://api.github.com/repos/jquery/qunit","forks_url":"https://api.github.com/repos/jquery/qunit/forks","keys_url":"https://api.github.com/repos/jquery/qunit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jquery/qunit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jquery/qunit/teams","hooks_url":"https://api.github.com/repos/jquery/qunit/hooks","issue_events_url":"https://api.github.com/repos/jquery/qunit/issues/events{/number}","events_url":"https://api.github.com/repos/jquery/qunit/events","assignees_url":"https://api.github.com/repos/jquery/qunit/assignees{/user}","branches_url":"https://api.github.com/repos/jquery/qunit/branches{/branch}","tags_url":"https://api.github.com/repos/jquery/qunit/tags","blobs_url":"https://api.github.com/repos/jquery/qunit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jquery/qunit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jquery/qunit/git/refs{/sha}","trees_url":"https://api.github.com/repos/jquery/qunit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jquery/qunit/statuses/{sha}","languages_url":"https://api.github.com/repos/jquery/qunit/languages","stargazers_url":"https://api.github.com/repos/jquery/qunit/stargazers","contributors_url":"https://api.github.com/repos/jquery/qunit/contributors","subscribers_url":"https://api.github.com/repos/jquery/qunit/subscribers","subscription_url":"https://api.github.com/repos/jquery/qunit/subscription","commits_url":"https://api.github.com/repos/jquery/qunit/commits{/sha}","git_commits_url":"https://api.github.com/repos/jquery/qunit/git/commits{/sha}","comments_url":"https://api.github.com/repos/jquery/qunit/comments{/number}","issue_comment_url":"https://api.github.com/repos/jquery/qunit/issues/comments{/number}","contents_url":"https://api.github.com/repos/jquery/qunit/contents/{+path}","compare_url":"https://api.github.com/repos/jquery/qunit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jquery/qunit/merges","archive_url":"https://api.github.com/repos/jquery/qunit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jquery/qunit/downloads","issues_url":"https://api.github.com/repos/jquery/qunit/issues{/number}","pulls_url":"https://api.github.com/repos/jquery/qunit/pulls{/number}","milestones_url":"https://api.github.com/repos/jquery/qunit/milestones{/number}","notifications_url":"https://api.github.com/repos/jquery/qunit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jquery/qunit/labels{/name}","releases_url":"https://api.github.com/repos/jquery/qunit/releases{/id}","deployments_url":"https://api.github.com/repos/jquery/qunit/deployments","created_at":"2009-07-24T16:26:23Z","updated_at":"2016-09-30T15:37:52Z","pushed_at":"2016-10-01T22:13:59Z","git_url":"git://github.com/jquery/qunit.git","ssh_url":"git@github.com:jquery/qunit.git","clone_url":"https://github.com/jquery/qunit.git","svn_url":"https://github.com/jquery/qunit","homepage":"http://qunitjs.com","size":6280,"stargazers_count":3537,"watchers_count":3537,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":723,"mirror_url":null,"open_issues_count":50,"forks":723,"open_issues":50,"watchers":3537,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jquery/qunit/pulls/1055"},"html":{"href":"https://github.com/jquery/qunit/pull/1055"},"issue":{"href":"https://api.github.com/repos/jquery/qunit/issues/1055"},"comments":{"href":"https://api.github.com/repos/jquery/qunit/issues/1055/comments"},"review_comments":{"href":"https://api.github.com/repos/jquery/qunit/pulls/1055/comments"},"review_comment":{"href":"https://api.github.com/repos/jquery/qunit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jquery/qunit/pulls/1055/commits"},"statuses":{"href":"https://api.github.com/repos/jquery/qunit/statuses/7fbe2330d45dd1073b494fd5d25b449a500acda2"}}}}
{"actor":{"display_login":"trentmwillis"}}