{"action":"created","issue":{"url":"https://api.github.com/repos/tapjs/node-tap/issues/473","repository_url":"https://api.github.com/repos/tapjs/node-tap","labels_url":"https://api.github.com/repos/tapjs/node-tap/issues/473/labels{/name}","comments_url":"https://api.github.com/repos/tapjs/node-tap/issues/473/comments","events_url":"https://api.github.com/repos/tapjs/node-tap/issues/473/events","html_url":"https://github.com/tapjs/node-tap/issues/473","id":378540702,"node_id":"MDU6SXNzdWUzNzg1NDA3MDI=","number":473,"title":"The spec reporter doesn't print out failure comparisons","user":{"login":"Fishrock123","id":1093990,"node_id":"MDQ6VXNlcjEwOTM5OTA=","avatar_url":"https://avatars0.githubusercontent.com/u/1093990?v=4","gravatar_id":"","url":"https://api.github.com/users/Fishrock123","html_url":"https://github.com/Fishrock123","followers_url":"https://api.github.com/users/Fishrock123/followers","following_url":"https://api.github.com/users/Fishrock123/following{/other_user}","gists_url":"https://api.github.com/users/Fishrock123/gists{/gist_id}","starred_url":"https://api.github.com/users/Fishrock123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fishrock123/subscriptions","organizations_url":"https://api.github.com/users/Fishrock123/orgs","repos_url":"https://api.github.com/users/Fishrock123/repos","events_url":"https://api.github.com/users/Fishrock123/events{/privacy}","received_events_url":"https://api.github.com/users/Fishrock123/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-11-08T01:30:29Z","updated_at":"2018-12-20T05:36:19Z","closed_at":null,"author_association":"NONE","body":"My team prefers the spec reporter (due to familiarity), however, when a failure occurs, we keep needing to switch to the default reporter, since the spec reporter doesn't seem to output any failure comparison.\r\n\r\ne.g. when using `t.match()`, no `found:` / `expected:` output is printed."},"comment":{"url":"https://api.github.com/repos/tapjs/node-tap/issues/comments/448879745","html_url":"https://github.com/tapjs/node-tap/issues/473#issuecomment-448879745","issue_url":"https://api.github.com/repos/tapjs/node-tap/issues/473","id":448879745,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODg3OTc0NQ==","user":{"login":"onetom","id":56646,"node_id":"MDQ6VXNlcjU2NjQ2","avatar_url":"https://avatars2.githubusercontent.com/u/56646?v=4","gravatar_id":"","url":"https://api.github.com/users/onetom","html_url":"https://github.com/onetom","followers_url":"https://api.github.com/users/onetom/followers","following_url":"https://api.github.com/users/onetom/following{/other_user}","gists_url":"https://api.github.com/users/onetom/gists{/gist_id}","starred_url":"https://api.github.com/users/onetom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onetom/subscriptions","organizations_url":"https://api.github.com/users/onetom/orgs","repos_url":"https://api.github.com/users/onetom/repos","events_url":"https://api.github.com/users/onetom/events{/privacy}","received_events_url":"https://api.github.com/users/onetom/received_events","type":"User","site_admin":false},"created_at":"2018-12-20T05:36:19Z","updated_at":"2018-12-20T05:36:19Z","author_association":"NONE","body":"I just thought to give `node-tap` a try after reading https://remysharp.com/2016/02/08/testing-tape-vs-tap and because I was encountering useless async stack traces.\r\nIn about 5 minutes I hit this very same issue...\r\n\r\nI'm using `jest` and very often I reach for the `.toMatchObject` matcher which is the rough equivalent of `t.match`. I never use regexes in the pattern I would like to match, so I find it extremely useful that the failure is presented as a colored diff.\r\n\r\nI'm a bit surprised by the screenshot, because it's not showing any stack trace :/\r\nMy output looks like this:\r\n```\r\n⋊> npx tap test/demo-flow.js -Rspec\r\n\r\ntest/demo-flow.js\r\n  xxx\r\n    1) should match pattern provided\r\n\r\n\r\n  0 passing (251.311ms)\r\n  1 failing\r\n\r\n  1) test/demo-flow.js xxx should match pattern provided:\r\n     Error: should match pattern provided\r\n      at Test.t.test (test/demo-flow.js:18:7)\r\n      at Object.<anonymous> (test/demo-flow.js:16:3)\r\n```\r\n\r\nI would like to point out that in this output stack-trace lines are prefixed with an `at` word, which makes JetBrains' IDEs to turn the file reference in parenthesis into hyperlinks, which open those files at the mentioned locations.\r\nThe classic output doesn't do this, so switching to it from the `spec` reported has a slight drawback...\r\nI hacked it around temporarily by transforming the reporter's output in the `test` script in `package.json`, but then I can't easily append extra parameters to the `tap` runner... :(\r\n\r\n```\r\n  \"scripts\": {\r\n    \"test\": \"tap test/*.js -Rclassic | awk '/\\\\(.+:.+:.+\\\\)/{print \\\"at \\\"$0;next} 1'\",\r\n  },\r\n```\r\n\r\n(the ouput is a bit ugly, becaus i've just appended the `at` to the very beginning of the line, but at least the script is not too long)"}}
{"actor":{"display_login":"onetom"}}