{"action":"closed","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/4907","labels_url":"https://api.github.com/repos/eslint/eslint/issues/4907/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/4907/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/4907/events","html_url":"https://github.com/eslint/eslint/issues/4907","id":125833488,"number":4907,"title":"RuleTester could use nested describes() for valid vs invalid rules","user":{"login":"platinumazure","id":284282,"avatar_url":"https://avatars.githubusercontent.com/u/284282?v=3","gravatar_id":"","url":"https://api.github.com/users/platinumazure","html_url":"https://github.com/platinumazure","followers_url":"https://api.github.com/users/platinumazure/followers","following_url":"https://api.github.com/users/platinumazure/following{/other_user}","gists_url":"https://api.github.com/users/platinumazure/gists{/gist_id}","starred_url":"https://api.github.com/users/platinumazure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platinumazure/subscriptions","organizations_url":"https://api.github.com/users/platinumazure/orgs","repos_url":"https://api.github.com/users/platinumazure/repos","events_url":"https://api.github.com/users/platinumazure/events{/privacy}","received_events_url":"https://api.github.com/users/platinumazure/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/accepted","name":"accepted","color":"0052cc"},{"url":"https://api.github.com/repos/eslint/eslint/labels/core","name":"core","color":"c7def8"},{"url":"https://api.github.com/repos/eslint/eslint/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-10T17:28:07Z","updated_at":"2016-01-14T16:35:23Z","closed_at":"2016-01-14T16:35:23Z","body":"At present, the RuleTester hierarchy (in mocha) looks like this:\r\n\r\n* describe(rule)\r\n    * it(some valid case)\r\n    * it(some valid case)\r\n    * ...\r\n    * it(some invalid case)\r\n    * it(some invalid case)\r\n    * ...\r\n\r\nIn other words, valid and invalid cases are all flat, immediately under the rule description. The problem I have with this is I can't immediately tell at a glance which cases are valid and which are invalid. (I know that all invalid ones are after all valid ones, but I don't know where the \"line\" is in between valid and invalid cases and the cases are not prefixed with valid/invalid.)\r\n\r\nI would like to add a level of nesting to make the output a little more readable without adding a ton of noise. My proposed hierarchy is this:\r\n\r\n* describe(rule)\r\n    * describe(\"valid cases\")\r\n        * it(some valid case)\r\n        * it(some valid case)\r\n        * ...\r\n    * describe(\"invalid cases\")\r\n        * it(some invalid case)\r\n        * it(some invalid case)\r\n        * ...\r\n\r\nThis should be a fairly simple change to rule-tester. Hopefully the unit tests won't be too hard to do either.\r\n\r\nEDIT (in response to @eslintbot):\r\n1. This is more a development problem, it exists in 1.10.3 and master and probably has existed in all versions of ESLint since RuleTester was integrated to the project\r\n2. Run any rule's tests and view the output\r\n3. Not a linting issue per se. See above.\r\n4. See above.\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29749689-ruletester-could-use-nested-describes-for-valid-vs-invalid-rules?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}