{"action":"created","issue":{"url":"https://api.github.com/repos/mochajs/mocha/issues/1705","labels_url":"https://api.github.com/repos/mochajs/mocha/issues/1705/labels{/name}","comments_url":"https://api.github.com/repos/mochajs/mocha/issues/1705/comments","events_url":"https://api.github.com/repos/mochajs/mocha/issues/1705/events","html_url":"https://github.com/mochajs/mocha/issues/1705","id":78535734,"number":1705,"title":"runner should emit 'skip' event when skipping a test","user":{"login":"avetisk","id":737729,"avatar_url":"https://avatars.githubusercontent.com/u/737729?v=3","gravatar_id":"","url":"https://api.github.com/users/avetisk","html_url":"https://github.com/avetisk","followers_url":"https://api.github.com/users/avetisk/followers","following_url":"https://api.github.com/users/avetisk/following{/other_user}","gists_url":"https://api.github.com/users/avetisk/gists{/gist_id}","starred_url":"https://api.github.com/users/avetisk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avetisk/subscriptions","organizations_url":"https://api.github.com/users/avetisk/orgs","repos_url":"https://api.github.com/users/avetisk/repos","events_url":"https://api.github.com/users/avetisk/events{/privacy}","received_events_url":"https://api.github.com/users/avetisk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-20T13:52:53Z","updated_at":"2015-05-21T15:36:19Z","closed_at":"2015-05-21T15:36:19Z","body":"Would allow reporters to show skipped tests, etc."},"comment":{"url":"https://api.github.com/repos/mochajs/mocha/issues/comments/104322348","html_url":"https://github.com/mochajs/mocha/issues/1705#issuecomment-104322348","issue_url":"https://api.github.com/repos/mochajs/mocha/issues/1705","id":104322348,"user":{"login":"dasilvacontin","id":1260830,"avatar_url":"https://avatars.githubusercontent.com/u/1260830?v=3","gravatar_id":"","url":"https://api.github.com/users/dasilvacontin","html_url":"https://github.com/dasilvacontin","followers_url":"https://api.github.com/users/dasilvacontin/followers","following_url":"https://api.github.com/users/dasilvacontin/following{/other_user}","gists_url":"https://api.github.com/users/dasilvacontin/gists{/gist_id}","starred_url":"https://api.github.com/users/dasilvacontin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dasilvacontin/subscriptions","organizations_url":"https://api.github.com/users/dasilvacontin/orgs","repos_url":"https://api.github.com/users/dasilvacontin/repos","events_url":"https://api.github.com/users/dasilvacontin/events{/privacy}","received_events_url":"https://api.github.com/users/dasilvacontin/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T15:36:18Z","updated_at":"2015-05-21T15:36:18Z","body":"Hi @avetisk! `.skip()` just marks the test/runnable as `pending`, so you should listen for the `'pending'` event instead.\r\n\r\n```js\r\nvar mocha = require('mocha')\r\nvar Runnable = mocha.Runnable\r\nvar Suite = mocha.Suite\r\nvar Runner = mocha.Runner\r\n\r\nvar test = new Runnable('testerino', function () {\r\n    console.log('very test')\r\n})\r\ntest.pending = true\r\n\r\nvar suite = new Suite()\r\nsuite.addTest(test)\r\n\r\nvar runner = new Runner(suite)\r\nrunner.on('pending', function (pending) {\r\n    console.log('pending/skipped test:', pending)\r\n})\r\nrunner.run()\r\n```\r\n\r\noutputs:\r\n\r\n```js\r\npending/skipped test: {\r\n  \"title\": \"testerino\",\r\n  \"async\": 0,\r\n  \"sync\": true,\r\n  \"timedOut\": false,\r\n  \"pending\": true,\r\n  \"parent\": \"#<Suite>\",\r\n  \"ctx\": \"#<Context>\"\r\n}\r\n```\r\n\r\nOtherwise, if you meant being able to differentiate between `pending` tests and `skipped` tests, let us know. Thanks!"}}