{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/4428","repository_url":"https://api.github.com/repos/facebook/jest","labels_url":"https://api.github.com/repos/facebook/jest/issues/4428/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/4428/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/4428/events","html_url":"https://github.com/facebook/jest/issues/4428","id":255324665,"number":4428,"title":"When coverageDirectory: './' --watch mode is not working","user":{"login":"tranotheron","id":11655498,"avatar_url":"https://avatars1.githubusercontent.com/u/11655498?v=4","gravatar_id":"","url":"https://api.github.com/users/tranotheron","html_url":"https://github.com/tranotheron","followers_url":"https://api.github.com/users/tranotheron/followers","following_url":"https://api.github.com/users/tranotheron/following{/other_user}","gists_url":"https://api.github.com/users/tranotheron/gists{/gist_id}","starred_url":"https://api.github.com/users/tranotheron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tranotheron/subscriptions","organizations_url":"https://api.github.com/users/tranotheron/orgs","repos_url":"https://api.github.com/users/tranotheron/repos","events_url":"https://api.github.com/users/tranotheron/events{/privacy}","received_events_url":"https://api.github.com/users/tranotheron/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-05T15:50:30Z","updated_at":"2017-09-05T15:52:30Z","closed_at":"2017-09-05T15:52:30Z","author_association":"NONE","body":"<!-- \r\nTHIS IS NOT A HELP FORUM. \r\nIf you are experiencing problems with setting up Jest, please make sure to visit our Help page: \r\nhttps://facebook.github.io/jest/help.html\r\n-->\r\n<!-- \r\nBefore creating an issue please check the following:\r\n* you are using the latest version of Jest\r\n* try re-installing your node_modules folder \r\n* run Jest once with `--no-cache` to see if that fixes the problem you are experiencing. \r\n-->\r\n\r\n**Do you want to request a *feature* or report a *bug*?**\r\nbug\r\n\r\n**What is the current behavior?**\r\nWhen I set `coverageDirectory: './'` in jest.config.js file and try fire tests in watch mode it just not working. When I change anything in tested files or tests itself nothing happening. It's not working even with `--no-watchman` and `--no-cache` flag\r\n\r\n**If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can `yarn install` and `yarn test`.**\r\nI'm talking about that repository https://github.com/tranotheron/shoutr you can start `yarn test:watch` and check\r\n\r\n**What is the expected behavior?**\r\n--watch mode working properly with that coverageDirectory\r\n\r\n**Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.**\r\nmacOS Sierra ver. 10.12.6 (16G29)\r\nJest ver. 21.0.1\r\nnode ver. 8.4\r\nyarn ver. 0.27.5\r\nnpm ver. 4.6.1\r\nwatchman ver. 4.9.0\r\n\r\njest configuration:\r\n```javascript\r\n{\r\n  collectCoverage: true,\r\n  coverageDirectory: './',\r\n  collectCoverageFrom: [\r\n    'src/**/*.{js,jsx}',\r\n    '!**/node_modules/**',\r\n    '!**/index.js',\r\n  ],\r\n  coverageReporters: [\r\n    'text',\r\n    'lcovonly',\r\n  ],\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/jest/issues/comments/327219676","html_url":"https://github.com/facebook/jest/issues/4428#issuecomment-327219676","issue_url":"https://api.github.com/repos/facebook/jest/issues/4428","id":327219676,"user":{"login":"cpojer","id":13352,"avatar_url":"https://avatars0.githubusercontent.com/u/13352?v=4","gravatar_id":"","url":"https://api.github.com/users/cpojer","html_url":"https://github.com/cpojer","followers_url":"https://api.github.com/users/cpojer/followers","following_url":"https://api.github.com/users/cpojer/following{/other_user}","gists_url":"https://api.github.com/users/cpojer/gists{/gist_id}","starred_url":"https://api.github.com/users/cpojer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpojer/subscriptions","organizations_url":"https://api.github.com/users/cpojer/orgs","repos_url":"https://api.github.com/users/cpojer/repos","events_url":"https://api.github.com/users/cpojer/events{/privacy}","received_events_url":"https://api.github.com/users/cpojer/received_events","type":"User","site_admin":false},"created_at":"2017-09-05T15:52:30Z","updated_at":"2017-09-05T15:52:30Z","author_association":"MEMBER","body":"`coverageDirectory` is where the output folder for coverage is written, it is ignored from watch mode because otherwise it would go into an infinite loop. Set the folder back to `<rootDir>/coverage` and it will work properly. You shouldn't write the coverage output to the root of your project."}}
{"actor":{"display_login":"cpojer"}}