{"action":"created","issue":{"url":"https://api.github.com/repos/qunitjs/qunit/issues/1340","repository_url":"https://api.github.com/repos/qunitjs/qunit","labels_url":"https://api.github.com/repos/qunitjs/qunit/issues/1340/labels{/name}","comments_url":"https://api.github.com/repos/qunitjs/qunit/issues/1340/comments","events_url":"https://api.github.com/repos/qunitjs/qunit/issues/1340/events","html_url":"https://github.com/qunitjs/qunit/issues/1340","id":391999017,"node_id":"MDU6SXNzdWUzOTE5OTkwMTc=","number":1340,"title":"Defend against console mocks in TAP reporter","user":{"login":"Krinkle","id":156867,"node_id":"MDQ6VXNlcjE1Njg2Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/156867?v=4","gravatar_id":"","url":"https://api.github.com/users/Krinkle","html_url":"https://github.com/Krinkle","followers_url":"https://api.github.com/users/Krinkle/followers","following_url":"https://api.github.com/users/Krinkle/following{/other_user}","gists_url":"https://api.github.com/users/Krinkle/gists{/gist_id}","starred_url":"https://api.github.com/users/Krinkle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krinkle/subscriptions","organizations_url":"https://api.github.com/users/Krinkle/orgs","repos_url":"https://api.github.com/users/Krinkle/repos","events_url":"https://api.github.com/users/Krinkle/events{/privacy}","received_events_url":"https://api.github.com/users/Krinkle/received_events","type":"User","site_admin":false},"labels":[{"id":56162,"node_id":"MDU6TGFiZWw1NjE2Mg==","url":"https://api.github.com/repos/qunitjs/qunit/labels/component-reporter","name":"component-reporter","color":"c5def5","default":false},{"id":123290,"node_id":"MDU6TGFiZWwxMjMyOTA=","url":"https://api.github.com/repos/qunitjs/qunit/labels/type-problem","name":"type-problem","color":"f7c6c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-18T05:09:57Z","updated_at":"2018-12-24T19:36:26Z","closed_at":null,"author_association":"MEMBER","body":"## Test case\r\n```js\r\nQUnit.module( \"e2e/cli\", function() {\r\n\tQUnit.test( \"help\", function( assert ) {\r\n\t\tvar cli = function () {};\r\n\t\treturn cli( \"help\" ).then( ( data ) => {\r\n\t\t\tassert.strictEqual( data, true, 'data' );\r\n\t\t} );\r\n\t} );\r\n} );\r\n```\r\n\r\n## What actually happened?\r\n\r\n```\r\nqunit  test/\r\nTAP version 13\r\nok 1 Writer > constructor()\r\nok 2 Writer > child()\r\nok 3 Writer > prefix()\r\nok 4 e2e/cli > record\r\nok 5 e2e/cli > compare\r\nok 7 e2e/cli > unknown command\r\nok 8 e2e/conductor > record() - clean state per run\r\nok 9 conductor > expandScenario()\r\nok 10 util/is > like() - single type\r\nok 11 util/is > like() - multi type\r\nok 12 util/is > like() - plain object\r\n1..12\r\n# pass 11\r\n# skip 0\r\n# todo 0\r\n# fail 1\r\n```\r\n\r\n## Notes\r\n\r\nNote how there is nothing in the output other than `fail 1`. After I debugged the whole thing and realised that `cli()` didn't return a promise (`Cannot read property 'then' of undefined\")`, I did notice there is a tiny little clue.\r\n\r\nThe clue is, number 6 is skipped in the output (it goes from 5 to 7). So in retrospect, I could've used that to find which test the problem is with, and maybe from there find out what the problem is.\r\n\r\nInitially, though, I didn't even know where it was coming from."},"comment":{"url":"https://api.github.com/repos/qunitjs/qunit/issues/comments/449766098","html_url":"https://github.com/qunitjs/qunit/issues/1340#issuecomment-449766098","issue_url":"https://api.github.com/repos/qunitjs/qunit/issues/1340","id":449766098,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTc2NjA5OA==","user":{"login":"Krinkle","id":156867,"node_id":"MDQ6VXNlcjE1Njg2Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/156867?v=4","gravatar_id":"","url":"https://api.github.com/users/Krinkle","html_url":"https://github.com/Krinkle","followers_url":"https://api.github.com/users/Krinkle/followers","following_url":"https://api.github.com/users/Krinkle/following{/other_user}","gists_url":"https://api.github.com/users/Krinkle/gists{/gist_id}","starred_url":"https://api.github.com/users/Krinkle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krinkle/subscriptions","organizations_url":"https://api.github.com/users/Krinkle/orgs","repos_url":"https://api.github.com/users/Krinkle/repos","events_url":"https://api.github.com/users/Krinkle/events{/privacy}","received_events_url":"https://api.github.com/users/Krinkle/received_events","type":"User","site_admin":false},"created_at":"2018-12-24T19:36:26Z","updated_at":"2018-12-24T19:36:26Z","author_association":"MEMBER","body":"@trentmwillis Yeah, something like that.\r\n\r\nI haven't tried fixing it yet, but I assumed we'd have to do the ref-saving in js-reporters/TapReporter, rather than in qunit. But.. maybe we need both?"}}
{"actor":{"display_login":"Krinkle"}}