{"action":"created","issue":{"url":"https://api.github.com/repos/js-reporters/js-reporters/issues/69","repository_url":"https://api.github.com/repos/js-reporters/js-reporters","labels_url":"https://api.github.com/repos/js-reporters/js-reporters/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/js-reporters/js-reporters/issues/69/comments","events_url":"https://api.github.com/repos/js-reporters/js-reporters/issues/69/events","html_url":"https://github.com/js-reporters/js-reporters/pull/69","id":162003687,"number":69,"title":"TapReporter: update to be TAP13 compliant.","user":{"login":"flore77","id":11819686,"avatar_url":"https://avatars.githubusercontent.com/u/11819686?v=3","gravatar_id":"","url":"https://api.github.com/users/flore77","html_url":"https://github.com/flore77","followers_url":"https://api.github.com/users/flore77/followers","following_url":"https://api.github.com/users/flore77/following{/other_user}","gists_url":"https://api.github.com/users/flore77/gists{/gist_id}","starred_url":"https://api.github.com/users/flore77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flore77/subscriptions","organizations_url":"https://api.github.com/users/flore77/orgs","repos_url":"https://api.github.com/users/flore77/repos","events_url":"https://api.github.com/users/flore77/events{/privacy}","received_events_url":"https://api.github.com/users/flore77/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-23T19:27:11Z","updated_at":"2016-06-24T17:57:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/js-reporters/js-reporters/pulls/69","html_url":"https://github.com/js-reporters/js-reporters/pull/69","diff_url":"https://github.com/js-reporters/js-reporters/pull/69.diff","patch_url":"https://github.com/js-reporters/js-reporters/pull/69.patch"},"body":"Fixes #67."},"comment":{"url":"https://api.github.com/repos/js-reporters/js-reporters/issues/comments/228415766","html_url":"https://github.com/js-reporters/js-reporters/pull/69#issuecomment-228415766","issue_url":"https://api.github.com/repos/js-reporters/js-reporters/issues/69","id":228415766,"user":{"login":"flore77","id":11819686,"avatar_url":"https://avatars.githubusercontent.com/u/11819686?v=3","gravatar_id":"","url":"https://api.github.com/users/flore77","html_url":"https://github.com/flore77","followers_url":"https://api.github.com/users/flore77/followers","following_url":"https://api.github.com/users/flore77/following{/other_user}","gists_url":"https://api.github.com/users/flore77/gists{/gist_id}","starred_url":"https://api.github.com/users/flore77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flore77/subscriptions","organizations_url":"https://api.github.com/users/flore77/orgs","repos_url":"https://api.github.com/users/flore77/repos","events_url":"https://api.github.com/users/flore77/events{/privacy}","received_events_url":"https://api.github.com/users/flore77/received_events","type":"User","site_admin":false},"created_at":"2016-06-24T17:57:15Z","updated_at":"2016-06-24T17:57:15Z","body":"> Would be interesting to see some integration tests, e.g. with node-tap's CLI reporter.\r\n\r\nWhat do you mean by `node-tap's CLI reporter` ?\r\n\r\nI was thinking maybe some unit tests.\r\n\r\nIn the reporter constructor to have something like:\r\n```js\r\nconstructor(runner, output) {\r\n  ...\r\n  this.write = output || console.log;\r\n}\r\n\r\nonRunStart() {\r\n  this.write('TAP version 13');\r\n}\r\n\r\n...\r\n```\r\n\r\nThis way we can pass in:\r\n* an EventEmitter for the runner \r\n* for output a `spy`\r\n\r\nThis way we can emit events and we can check the spy is called with the correct parameters, something like:\r\n```js\r\nvar ev\r\n\r\nbefore(function() {\r\n  ev = new EventEmitter();\r\n  var reporter = new TapReporter(ev, spy);\r\n});\r\n\r\nit('should have the TAP13 header', function() {\r\n  ev.emit('runStart', {});\r\n  \r\n  expect(spy).to.have.been.calledWith('TAP version 13');\r\n}); \r\n```\r\n\r\nOf course we can do, instead (or both), some integration testing:\r\n* instantiate one of our adapters\r\n* run it against its fixture\r\n* use as reporter the TapReporter\r\n* collect the reporter output\r\n* compare the output with the expected one"}}
{"actor":{"display_login":"flore77"}}