{"action":"created","comment":{"url":"https://api.github.com/repos/jquery/jquery/pulls/comments/30564262","id":30564262,"diff_hunk":"@@ -2363,4 +2365,266 @@ test( \"Show/hide/toggle and display: inline\", function() {\n \t});\n });\n \n+test( \"jQuery.Tween - Default propHooks on plain objects\", function() {\n+\texpect( 8 );\n+\tvar propHooks, defaultHook, testObject, fakeTween, stepSpy;\n+\n+\tpropHooks = jQuery.Tween.propHooks;\n+\tequal( typeof propHooks, \"object\", \"jQuery.Tween.propHooks exists\" );\n+\n+\tdefaultHook = propHooks._default;\n+\tok( defaultHook, \"_default propHook exists\" );\n+\n+\ttestObject = { test: 0 };\n+\tfakeTween = { elem: testObject, prop: \"test\", now: 10, unit: \"px\" };\n+\n+\tequal( defaultHook.get( fakeTween ), 0, \"Can get property of object\" );\n+\n+\tfakeTween.prop = \"testMissing\";\n+\tequal( defaultHook.get( fakeTween ), undefined, \"Can get missing property on object\" );\n+\n+\tdefaultHook.set( fakeTween );\n+\tequal( testObject.testMissing, 10, \"Sets missing value properly on plain object\" );\n+\n+\tfakeTween.prop = \"opacity\";\n+\tdefaultHook.set( fakeTween );\n+\tequal( testObject.opacity, 10, \"Correctly set opacity on plain object\" );\n+\n+\tfakeTween.prop = \"test\";\n+\tstepSpy = jQuery.fx.step.test = this.sandbox.spy();\n+\n+\tdefaultHook.set( fakeTween );\n+\tok( stepSpy.calledWith( fakeTween ), \"Step function called with Tween\" );\n+\tequal( testObject.test, 0, \"Because step didn't set, value is unchanged\" );\n+});\n+\n+test( \"jQuery.Tween - Default propHooks on elements\", function() {\n+\texpect( 19 );\n+\tvar propHooks, defaultHook, testElement, fakeTween, cssStub, styleStub, stepSpy;\n+\n+\tpropHooks = jQuery.Tween.propHooks;\n+\tequal( typeof propHooks, \"object\", \"jQuery.Tween.propHooks exists\" );\n+\n+\tdefaultHook = propHooks._default;\n+\tok( defaultHook, \"_default propHook exists\" );\n+\n+\ttestElement = jQuery( \"<div>\" )[ 0 ];\n+\tfakeTween = { elem: testElement, prop: \"height\", now: 10, unit: \"px\" };\n+\n+\tcssStub = this.sandbox.stub( jQuery, \"css\" ).returns( 10 );\n+\n+\tequal( defaultHook.get( fakeTween ), 10, \"Gets expected style value\" );\n+\tok( cssStub.calledWith( testElement, \"height\", \"\" ), \"Calls jQuery.css correctly\" );\n+\n+\tfakeTween.prop = \"testOpti\";\n+\ttestElement.testOpti = 15;\n+\tcssStub.reset();\n+\n+\tequal( defaultHook.get( fakeTween ), 15, \"Gets expected value not defined on style\" );\n+\tequal( cssStub.callCount, 0, \"Did not call jQuery.css\" );\n+\n+\tfakeTween.prop = \"testMissing\";\n+\tequal( defaultHook.get( fakeTween ), 10, \"Can get missing property on element\" );\n+\tok( cssStub.calledWith( testElement, \"testMissing\", \"\"), \"...using jQuery.css\" );\n+\n+\tcssStub.returns( \"\" );\n+\tequal( defaultHook.get( fakeTween ), 0, \"Uses 0 for empty string\" );\n+\n+\tcssStub.returns( \"auto\" );\n+\tequal( defaultHook.get( fakeTween ), 0, \"Uses 0 for 'auto'\" );\n+\n+\tcssStub.returns( null );\n+\tequal( defaultHook.get( fakeTween ), 0, \"Uses 0 for null\" );\n+\n+\tcssStub.returns( undefined );\n+\tequal( defaultHook.get( fakeTween ), 0, \"Uses 0 for undefined\" );\n+\n+\tcssStub.reset();\n+\n+\t// Setters\n+\tstyleStub = this.sandbox.stub( jQuery, \"style\" );\n+\tfakeTween.prop = \"height\";\n+\n+\tdefaultHook.set( fakeTween );\n+\tok( styleStub.calledWith( testElement, \"height\", \"10px\" ), \"Calls jQuery.style with elem, prop, now+unit\" );\n+\n+\tstyleStub.reset();\n+\tfakeTween.prop = \"testMissing\";\n+\n+\tdefaultHook.set( fakeTween );\n+\tequal( styleStub.callCount, 0, \"Did not call jQuery.style for non css property\" );\n+\tequal( testElement.testMissing, 10, \"Instead, set value on element directly\" );\n+\n+\tjQuery.cssHooks.testMissing = jQuery.noop;\n+\tfakeTween.now = 11;\n+\n+\tdefaultHook.set( fakeTween );\n+\tdelete jQuery.cssHooks.testMissing;\n+\n+\tok( styleStub.calledWith( testElement, \"testMissing\", \"11px\" ), \"Presence of cssHooks causes jQuery.style with elem, prop, now+unit\" );\n+\tequal( testElement.testMissing, 10, \"And value was unchanged\" );\n+\n+\tstepSpy = jQuery.fx.step.test = this.sandbox.spy();\n+\tstyleStub.reset();\n+\n+\tfakeTween.prop = \"test\";\n+\tdefaultHook.set( fakeTween );\n+\tok( stepSpy.calledWith( fakeTween ), \"Step function called with Tween\" );\n+\tequal( styleStub.callCount, 0, \"Did not call jQuery.style\" );\n+});\n+\n+test( \"jQuery.Tween - Plain Object\", function() {\n+\texpect( 13 );\n+\tvar testObject = { test: 100 },\n+\t\ttestOptions = { duration: 100 },\n+\t\ttween, easingSpy;\n+\n+\ttween = jQuery.Tween( testObject, testOptions, \"test\", 0, \"linear\" );\n+\tequal( tween.elem, testObject, \"Sets .element\" );\n+\tequal( tween.options, testOptions, \"sets .options\" );\n+\tequal( tween.prop, \"test\", \"sets .prop\" );\n+\tequal( tween.end, 0, \"sets .end\" );\n+\n+\tequal( tween.easing, \"linear\", \"sets .easing when provided\" );\n+\n+\tequal( tween.start, 100, \"Reads .start value during construction\" );\n+\tequal( tween.now, 100, \"Reads .now value during construction\" );\n+\n+\teasingSpy = this.sandbox.spy( jQuery.easing, \"linear\" );\n+\n+\tequal( tween.run(0.1), tween, \".run() returns this\" );\n+\n+\tequal( tween.now, 90, \"Calculated tween\" );\n+\n+\tok( easingSpy.calledWith( 0.1, 0.1 * testOptions.duration, 0, 1, testOptions.duration ), \"...using jQuery.easing.linear with back-compat arguments\" );\n+\tequal( testObject.test, 90, \"Set value\" );\n+\n+\ttween.run(1);\n+\tequal( testObject.test, 0, \"Checking another value\");\n+\n+\ttween.run(0);\n+\tequal( testObject.test, 100, \"Can even go back in time\");\n+});\n+\n+test( \"jQuery.Tween - Element\", function() {\n+\texpect( 15 );\n+\tvar testElement = jQuery( \"<div>\" ).css( \"height\", 100 )[ 0 ],\n+\t\ttestOptions = { duration: 100 },\n+\t\ttween, easingSpy, eased;\n+\n+\ttween = jQuery.Tween( testElement, testOptions, \"height\", 0 );\n+\tequal( tween.elem, testElement, \"Sets .element\" );\n+\tequal( tween.options, testOptions, \"sets .options\" );\n+\tequal( tween.prop, \"height\", \"sets .prop\" );\n+\tequal( tween.end, 0, \"sets .end\" );\n+\n+\tequal( tween.easing, jQuery.easing._default, \"sets .easing to default when not provided\" );\n+\tequal( tween.unit, \"px\", \"sets .unit to px when not provided\" );\n+\n+\tequal( tween.start, 100, \"Reads .start value during construction\" );\n+\tequal( tween.now, 100, \"Reads .now value during construction\" );\n+\n+\teasingSpy = this.sandbox.spy( jQuery.easing, \"swing\" );\n+\n+\tequal( tween.run(0.1), tween, \".run() returns this\" );\n+\tequal( tween.pos, jQuery.easing.swing( 0.1 ), \"set .pos\" );\n+\teased = 100 - (jQuery.easing.swing(0.1) * 100);","path":"test/unit/effects.js","position":185,"original_position":185,"commit_id":"bf0b1a8a94b14611ddcc1693f28c5cdf3dd47e69","original_commit_id":"bf0b1a8a94b14611ddcc1693f28c5cdf3dd47e69","user":{"login":"arschmitz","id":462993,"avatar_url":"https://avatars.githubusercontent.com/u/462993?v=3","gravatar_id":"","url":"https://api.github.com/users/arschmitz","html_url":"https://github.com/arschmitz","followers_url":"https://api.github.com/users/arschmitz/followers","following_url":"https://api.github.com/users/arschmitz/following{/other_user}","gists_url":"https://api.github.com/users/arschmitz/gists{/gist_id}","starred_url":"https://api.github.com/users/arschmitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschmitz/subscriptions","organizations_url":"https://api.github.com/users/arschmitz/orgs","repos_url":"https://api.github.com/users/arschmitz/repos","events_url":"https://api.github.com/users/arschmitz/events{/privacy}","received_events_url":"https://api.github.com/users/arschmitz/received_events","type":"User","site_admin":false},"body":"missing spaces inside swing","created_at":"2015-05-19T02:10:32Z","updated_at":"2015-05-19T02:10:32Z","html_url":"https://github.com/jquery/jquery/pull/2326#discussion_r30564262","pull_request_url":"https://api.github.com/repos/jquery/jquery/pulls/2326","_links":{"self":{"href":"https://api.github.com/repos/jquery/jquery/pulls/comments/30564262"},"html":{"href":"https://github.com/jquery/jquery/pull/2326#discussion_r30564262"},"pull_request":{"href":"https://api.github.com/repos/jquery/jquery/pulls/2326"}}},"pull_request":{"url":"https://api.github.com/repos/jquery/jquery/pulls/2326","id":35674097,"html_url":"https://github.com/jquery/jquery/pull/2326","diff_url":"https://github.com/jquery/jquery/pull/2326.diff","patch_url":"https://github.com/jquery/jquery/pull/2326.patch","issue_url":"https://api.github.com/repos/jquery/jquery/issues/2326","number":2326,"state":"open","locked":false,"title":"Effects: Add tests for jQuery.Tween","user":{"login":"gnarf","id":549355,"avatar_url":"https://avatars.githubusercontent.com/u/549355?v=3","gravatar_id":"","url":"https://api.github.com/users/gnarf","html_url":"https://github.com/gnarf","followers_url":"https://api.github.com/users/gnarf/followers","following_url":"https://api.github.com/users/gnarf/following{/other_user}","gists_url":"https://api.github.com/users/gnarf/gists{/gist_id}","starred_url":"https://api.github.com/users/gnarf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnarf/subscriptions","organizations_url":"https://api.github.com/users/gnarf/orgs","repos_url":"https://api.github.com/users/gnarf/repos","events_url":"https://api.github.com/users/gnarf/events{/privacy}","received_events_url":"https://api.github.com/users/gnarf/received_events","type":"User","site_admin":false},"body":"Still a bit of a \"work in progress\" - Just submitting it up for review...\r\n\r\nI'm a bit rusty on code style and the test files aren't jscs'ed yet... A little help here could probably be useful.\r\n\r\nAlso, any thoughts about these tests appreciated.","created_at":"2015-05-18T21:13:11Z","updated_at":"2015-05-19T02:10:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cba3b0fd9c9cee78345acb16e687acd9eeb7a662","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jquery/jquery/pulls/2326/commits","review_comments_url":"https://api.github.com/repos/jquery/jquery/pulls/2326/comments","review_comment_url":"https://api.github.com/repos/jquery/jquery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jquery/jquery/issues/2326/comments","statuses_url":"https://api.github.com/repos/jquery/jquery/statuses/bf0b1a8a94b14611ddcc1693f28c5cdf3dd47e69","head":{"label":"gnarf:effects-tests","ref":"effects-tests","sha":"bf0b1a8a94b14611ddcc1693f28c5cdf3dd47e69","user":{"login":"gnarf","id":549355,"avatar_url":"https://avatars.githubusercontent.com/u/549355?v=3","gravatar_id":"","url":"https://api.github.com/users/gnarf","html_url":"https://github.com/gnarf","followers_url":"https://api.github.com/users/gnarf/followers","following_url":"https://api.github.com/users/gnarf/following{/other_user}","gists_url":"https://api.github.com/users/gnarf/gists{/gist_id}","starred_url":"https://api.github.com/users/gnarf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnarf/subscriptions","organizations_url":"https://api.github.com/users/gnarf/orgs","repos_url":"https://api.github.com/users/gnarf/repos","events_url":"https://api.github.com/users/gnarf/events{/privacy}","received_events_url":"https://api.github.com/users/gnarf/received_events","type":"User","site_admin":false},"repo":{"id":1224487,"name":"jquery","full_name":"gnarf/jquery","owner":{"login":"gnarf","id":549355,"avatar_url":"https://avatars.githubusercontent.com/u/549355?v=3","gravatar_id":"","url":"https://api.github.com/users/gnarf","html_url":"https://github.com/gnarf","followers_url":"https://api.github.com/users/gnarf/followers","following_url":"https://api.github.com/users/gnarf/following{/other_user}","gists_url":"https://api.github.com/users/gnarf/gists{/gist_id}","starred_url":"https://api.github.com/users/gnarf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnarf/subscriptions","organizations_url":"https://api.github.com/users/gnarf/orgs","repos_url":"https://api.github.com/users/gnarf/repos","events_url":"https://api.github.com/users/gnarf/events{/privacy}","received_events_url":"https://api.github.com/users/gnarf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gnarf/jquery","description":"jQuery JavaScript Library","fork":true,"url":"https://api.github.com/repos/gnarf/jquery","forks_url":"https://api.github.com/repos/gnarf/jquery/forks","keys_url":"https://api.github.com/repos/gnarf/jquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gnarf/jquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gnarf/jquery/teams","hooks_url":"https://api.github.com/repos/gnarf/jquery/hooks","issue_events_url":"https://api.github.com/repos/gnarf/jquery/issues/events{/number}","events_url":"https://api.github.com/repos/gnarf/jquery/events","assignees_url":"https://api.github.com/repos/gnarf/jquery/assignees{/user}","branches_url":"https://api.github.com/repos/gnarf/jquery/branches{/branch}","tags_url":"https://api.github.com/repos/gnarf/jquery/tags","blobs_url":"https://api.github.com/repos/gnarf/jquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gnarf/jquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gnarf/jquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/gnarf/jquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gnarf/jquery/statuses/{sha}","languages_url":"https://api.github.com/repos/gnarf/jquery/languages","stargazers_url":"https://api.github.com/repos/gnarf/jquery/stargazers","contributors_url":"https://api.github.com/repos/gnarf/jquery/contributors","subscribers_url":"https://api.github.com/repos/gnarf/jquery/subscribers","subscription_url":"https://api.github.com/repos/gnarf/jquery/subscription","commits_url":"https://api.github.com/repos/gnarf/jquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/gnarf/jquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/gnarf/jquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/gnarf/jquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/gnarf/jquery/contents/{+path}","compare_url":"https://api.github.com/repos/gnarf/jquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gnarf/jquery/merges","archive_url":"https://api.github.com/repos/gnarf/jquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gnarf/jquery/downloads","issues_url":"https://api.github.com/repos/gnarf/jquery/issues{/number}","pulls_url":"https://api.github.com/repos/gnarf/jquery/pulls{/number}","milestones_url":"https://api.github.com/repos/gnarf/jquery/milestones{/number}","notifications_url":"https://api.github.com/repos/gnarf/jquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gnarf/jquery/labels{/name}","releases_url":"https://api.github.com/repos/gnarf/jquery/releases{/id}","created_at":"2011-01-05T21:59:18Z","updated_at":"2013-11-27T00:49:52Z","pushed_at":"2015-05-18T21:11:58Z","git_url":"git://github.com/gnarf/jquery.git","ssh_url":"git@github.com:gnarf/jquery.git","clone_url":"https://github.com/gnarf/jquery.git","svn_url":"https://github.com/gnarf/jquery","homepage":"http://jquery.com/","size":15956,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"jquery:master","ref":"master","sha":"61e21a4eaf479406b660328f4df7e3183c32386b","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":167174,"name":"jquery","full_name":"jquery/jquery","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/jquery","description":"jQuery JavaScript Library","fork":false,"url":"https://api.github.com/repos/jquery/jquery","forks_url":"https://api.github.com/repos/jquery/jquery/forks","keys_url":"https://api.github.com/repos/jquery/jquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jquery/jquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jquery/jquery/teams","hooks_url":"https://api.github.com/repos/jquery/jquery/hooks","issue_events_url":"https://api.github.com/repos/jquery/jquery/issues/events{/number}","events_url":"https://api.github.com/repos/jquery/jquery/events","assignees_url":"https://api.github.com/repos/jquery/jquery/assignees{/user}","branches_url":"https://api.github.com/repos/jquery/jquery/branches{/branch}","tags_url":"https://api.github.com/repos/jquery/jquery/tags","blobs_url":"https://api.github.com/repos/jquery/jquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jquery/jquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jquery/jquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/jquery/jquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jquery/jquery/statuses/{sha}","languages_url":"https://api.github.com/repos/jquery/jquery/languages","stargazers_url":"https://api.github.com/repos/jquery/jquery/stargazers","contributors_url":"https://api.github.com/repos/jquery/jquery/contributors","subscribers_url":"https://api.github.com/repos/jquery/jquery/subscribers","subscription_url":"https://api.github.com/repos/jquery/jquery/subscription","commits_url":"https://api.github.com/repos/jquery/jquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/jquery/jquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/jquery/jquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/jquery/jquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/jquery/jquery/contents/{+path}","compare_url":"https://api.github.com/repos/jquery/jquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jquery/jquery/merges","archive_url":"https://api.github.com/repos/jquery/jquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jquery/jquery/downloads","issues_url":"https://api.github.com/repos/jquery/jquery/issues{/number}","pulls_url":"https://api.github.com/repos/jquery/jquery/pulls{/number}","milestones_url":"https://api.github.com/repos/jquery/jquery/milestones{/number}","notifications_url":"https://api.github.com/repos/jquery/jquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jquery/jquery/labels{/name}","releases_url":"https://api.github.com/repos/jquery/jquery/releases{/id}","created_at":"2009-04-03T15:20:14Z","updated_at":"2015-05-19T02:09:45Z","pushed_at":"2015-05-18T21:13:11Z","git_url":"git://github.com/jquery/jquery.git","ssh_url":"git@github.com:jquery/jquery.git","clone_url":"https://github.com/jquery/jquery.git","svn_url":"https://github.com/jquery/jquery","homepage":"http://jquery.com/","size":40768,"stargazers_count":34458,"watchers_count":34458,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":8415,"mirror_url":null,"open_issues_count":101,"forks":8415,"open_issues":101,"watchers":34458,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jquery/jquery/pulls/2326"},"html":{"href":"https://github.com/jquery/jquery/pull/2326"},"issue":{"href":"https://api.github.com/repos/jquery/jquery/issues/2326"},"comments":{"href":"https://api.github.com/repos/jquery/jquery/issues/2326/comments"},"review_comments":{"href":"https://api.github.com/repos/jquery/jquery/pulls/2326/comments"},"review_comment":{"href":"https://api.github.com/repos/jquery/jquery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jquery/jquery/pulls/2326/commits"},"statuses":{"href":"https://api.github.com/repos/jquery/jquery/statuses/bf0b1a8a94b14611ddcc1693f28c5cdf3dd47e69"}}}}