{"action":"created","issue":{"url":"https://api.github.com/repos/jquery/qunit/issues/787","labels_url":"https://api.github.com/repos/jquery/qunit/issues/787/labels{/name}","comments_url":"https://api.github.com/repos/jquery/qunit/issues/787/comments","events_url":"https://api.github.com/repos/jquery/qunit/issues/787/events","html_url":"https://github.com/jquery/qunit/issues/787","id":62411677,"number":787,"title":"Pendings tests","user":{"login":"jzaefferer","id":52585,"avatar_url":"https://avatars.githubusercontent.com/u/52585?v=3","gravatar_id":"","url":"https://api.github.com/users/jzaefferer","html_url":"https://github.com/jzaefferer","followers_url":"https://api.github.com/users/jzaefferer/followers","following_url":"https://api.github.com/users/jzaefferer/following{/other_user}","gists_url":"https://api.github.com/users/jzaefferer/gists{/gist_id}","starred_url":"https://api.github.com/users/jzaefferer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzaefferer/subscriptions","organizations_url":"https://api.github.com/users/jzaefferer/orgs","repos_url":"https://api.github.com/users/jzaefferer/repos","events_url":"https://api.github.com/users/jzaefferer/events{/privacy}","received_events_url":"https://api.github.com/users/jzaefferer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jquery/qunit/labels/api","name":"api","color":"bfe5bf"},{"url":"https://api.github.com/repos/jquery/qunit/labels/enhancement","name":"enhancement","color":"c7def8"},{"url":"https://api.github.com/repos/jquery/qunit/labels/help-wanted","name":"help-wanted","color":"fbca04"},{"url":"https://api.github.com/repos/jquery/qunit/labels/reporter","name":"reporter","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-03-17T14:22:55Z","updated_at":"2015-04-15T17:04:37Z","closed_at":null,"body":"Something that came out of a discussion with Yehuda: During a big refactoring they have hundreds of failing tests. They turned them off using `QUnit.skip`, but that doesn't tell them which of the skipped tests starting passing again at some point. To quickly test changes in passing tests, they ended up with this:\r\n```js\r\nQUnit.skip = QUnit.test;\r\n```\r\nThere's probably a better way to deal with that situation. One idea is to have something like a `QUnit.pending` method, that has the same signature as `QUnit.test()`, but will reverse the result. So if all assertions pass, the test fails, if at least one fails, the test passes.\r\n\r\nThe HTML reporter could use a similar marker as `QUnit.skip`.\r\n\r\nThoughts?\r\n\r\n---\r\n\r\n*Update 2015-04-15*:\r\n\r\nAfter some discussion, we came up with this:\r\n\r\n```js\r\n// This test will show up with a \"todo\" badge, with a similar style as the \"skipped\" badge\r\nQUnit.todo( \"this isn't implemented, yet\" function( assert ) {\r\n\r\n  // This test will pass when this assertion fails, along with all other assertions, or \"fail\" when at least one passes\r\n  assert.ok( featureTest(), \"waiting for feature\" );\r\n} );\r\n\r\nQUnit.testDone( function( details ) {\r\n  console.log( details.name, details.todo );\r\n  //> \"this isn't implemented, yet\" true\r\n} );\r\n\r\nQUnit.log( function( details ) {\r\n  console.log( details.message, details.todo );\r\n  //> \"waiting for feature\" true\r\n} );\r\n```"},"comment":{"url":"https://api.github.com/repos/jquery/qunit/issues/comments/93487838","html_url":"https://github.com/jquery/qunit/issues/787#issuecomment-93487838","issue_url":"https://api.github.com/repos/jquery/qunit/issues/787","id":93487838,"user":{"login":"gibson042","id":1199584,"avatar_url":"https://avatars.githubusercontent.com/u/1199584?v=3","gravatar_id":"","url":"https://api.github.com/users/gibson042","html_url":"https://github.com/gibson042","followers_url":"https://api.github.com/users/gibson042/followers","following_url":"https://api.github.com/users/gibson042/following{/other_user}","gists_url":"https://api.github.com/users/gibson042/gists{/gist_id}","starred_url":"https://api.github.com/users/gibson042/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gibson042/subscriptions","organizations_url":"https://api.github.com/users/gibson042/orgs","repos_url":"https://api.github.com/users/gibson042/repos","events_url":"https://api.github.com/users/gibson042/events{/privacy}","received_events_url":"https://api.github.com/users/gibson042/received_events","type":"User","site_admin":false},"created_at":"2015-04-15T17:04:37Z","updated_at":"2015-04-15T17:04:37Z","body":"Looks good except for this:\r\n> This test will pass when this assertion fails, along with all other assertions, or \"fail\" when at least one passes\r\n\r\nI expect \"todo\" tests to pass when at least one assertion fails, or \"fail\" when _all_ assertions pass."}}