{"action":"created","issue":{"url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/2302","repository_url":"https://api.github.com/repos/SeleniumHQ/selenium","labels_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/2302/labels{/name}","comments_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/2302/comments","events_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/2302/events","html_url":"https://github.com/SeleniumHQ/selenium/issues/2302","id":160675501,"number":2302,"title":"Mocha BDD wrapping incorrectly for it.only","user":{"login":"noisette44","id":11979403,"avatar_url":"https://avatars.githubusercontent.com/u/11979403?v=3","gravatar_id":"","url":"https://api.github.com/users/noisette44","html_url":"https://github.com/noisette44","followers_url":"https://api.github.com/users/noisette44/followers","following_url":"https://api.github.com/users/noisette44/following{/other_user}","gists_url":"https://api.github.com/users/noisette44/gists{/gist_id}","starred_url":"https://api.github.com/users/noisette44/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noisette44/subscriptions","organizations_url":"https://api.github.com/users/noisette44/orgs","repos_url":"https://api.github.com/users/noisette44/repos","events_url":"https://api.github.com/users/noisette44/events{/privacy}","received_events_url":"https://api.github.com/users/noisette44/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SeleniumHQ/selenium/labels/C-nodejs","name":"C-nodejs","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-06-16T14:27:57Z","updated_at":"2016-06-22T08:18:07Z","closed_at":"2016-06-21T20:58:58Z","body":"## Meta -\r\nOS:  Windows 7\r\nSelenium Version: 2.53.2 \r\nMocha version : 2.5.3\r\n\r\n## Expected Behavior -\r\n\r\n\"it.only\" function inside [javascript/node/selenium-webdriver/testing/index.js](https://github.com/SeleniumHQ/selenium/blob/ede98def1f85600ec120536bd1f36f244a331b86/javascript/node/selenium-webdriver/testing/index.js) should correctly wrapped for asynchronous code.\r\n\r\n```\r\nexports.it = wrapped(global.it);\r\nexports.iit = exports.it.only = wrapped(global.it.only);\r\n```\r\n\r\n## Actual Behavior -\r\n\r\nSince mocha V2.4.1 and this [commit](https://github.com/mochajs/mocha/commit/08bf74d8440b811e42bf4b8150a4977a05472c9a) \"it.only\" function is not correctly wrapped because it call original \"it\" mocha function and no more \"it\" wrapped function. So, test is not run in asynchronous mode.\r\n\r\n```\r\ncontext.it.only = function(title, fn) {\r\n   var test = it(title, fn); // => Since mocha 2.4.1 - use original mocha \"it\" function\r\n   var reString = '^' + escapeRe(test.fullTitle()) + '$';\r\n   mocha.grep(new RegExp(reString));\r\n   return test;\r\n}\r\n```\r\nmocha issue : [https://github.com/mochajs/mocha/issues/2157](https://github.com/mochajs/mocha/issues/2157#issuecomment-224475198)\r\n\r\nNow using own `it.only` function is necessary instead of wrapping."},"comment":{"url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/comments/227674646","html_url":"https://github.com/SeleniumHQ/selenium/issues/2302#issuecomment-227674646","issue_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/2302","id":227674646,"user":{"login":"noisette44","id":11979403,"avatar_url":"https://avatars.githubusercontent.com/u/11979403?v=3","gravatar_id":"","url":"https://api.github.com/users/noisette44","html_url":"https://github.com/noisette44","followers_url":"https://api.github.com/users/noisette44/followers","following_url":"https://api.github.com/users/noisette44/following{/other_user}","gists_url":"https://api.github.com/users/noisette44/gists{/gist_id}","starred_url":"https://api.github.com/users/noisette44/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noisette44/subscriptions","organizations_url":"https://api.github.com/users/noisette44/orgs","repos_url":"https://api.github.com/users/noisette44/repos","events_url":"https://api.github.com/users/noisette44/events{/privacy}","received_events_url":"https://api.github.com/users/noisette44/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T08:18:07Z","updated_at":"2016-06-22T08:18:07Z","body":"@jleyba Sorry for the delay - and thanks a lot for your feedback\r\n\r\nI agree with @ScottFreeCode - it's a protractor issue since mocha \"it.only\" no more uses \"global.it\""}}
{"actor":{"display_login":"noisette44"}}