{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/6668","repository_url":"https://api.github.com/repos/facebook/jest","labels_url":"https://api.github.com/repos/facebook/jest/issues/6668/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/6668/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/6668/events","html_url":"https://github.com/facebook/jest/issues/6668","id":339818950,"node_id":"MDU6SXNzdWUzMzk4MTg5NTA=","number":6668,"title":"Coverage report include test files \"__test__\" and \"*.test.js\"","user":{"login":"retyui","id":4661784,"node_id":"MDQ6VXNlcjQ2NjE3ODQ=","avatar_url":"https://avatars1.githubusercontent.com/u/4661784?v=4","gravatar_id":"","url":"https://api.github.com/users/retyui","html_url":"https://github.com/retyui","followers_url":"https://api.github.com/users/retyui/followers","following_url":"https://api.github.com/users/retyui/following{/other_user}","gists_url":"https://api.github.com/users/retyui/gists{/gist_id}","starred_url":"https://api.github.com/users/retyui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/retyui/subscriptions","organizations_url":"https://api.github.com/users/retyui/orgs","repos_url":"https://api.github.com/users/retyui/repos","events_url":"https://api.github.com/users/retyui/events{/privacy}","received_events_url":"https://api.github.com/users/retyui/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-07-10T12:24:37Z","updated_at":"2018-07-10T13:45:11Z","closed_at":null,"author_association":"NONE","body":"<!-- Love Jest? Please consider supporting our collective: 👉  https://opencollective.com/jest/donate -->\r\n\r\n## 🐛 Bug Report\r\n\r\nWhen I run the tests on the local machine my tests coverage 85%, but when the tests pass to my CI testing coverage there is 83%\r\nAnd the reason for this difference is that on the local machine in the calculation of coverage tests take part in test (`*.test.js`, `__test__/*`) files.\r\n\r\n## To Reproduce\r\n\r\n`yarn test --coverage # in my demo repository`\r\nResult:\r\n```bash\r\n PASS  ./test.js\r\n  ✓ should anything (3ms)\r\n\r\n----------|----------|----------|----------|----------|-------------------|\r\nFile      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |\r\n----------|----------|----------|----------|----------|-------------------|\r\nAll files |    81.82 |       50 |    33.33 |    81.82 |                   |\r\n index.js |    71.43 |       50 |       50 |    71.43 |               3,8 |\r\n test.js  |      100 |      100 |       25 |      100 |                   |\r\n----------|----------|----------|----------|----------|-------------------|\r\nTest Suites: 1 passed, 1 total\r\nTests:       1 passed, 1 total\r\nSnapshots:   0 total\r\nTime:        0.674s, estimated 1s\r\nRan all test suites.\r\nDone in 1.42s.\r\n```\r\n## Expected behavior\r\n\r\nTest coverage should not contain test files\r\n\r\n## Link to repl or repo (highly encouraged)\r\nhttps://github.com/retyui/jest-invalid-coverage\r\n\r\n## `npx envinfo --preset jest` Results:\r\n\r\n```bash\r\n  System:\r\n    OS: Linux 4.15 Linux Mint 18.3 (Sylvia)\r\n    CPU: x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz\r\n  Binaries:\r\n    Node: 8.11.3 - /usr/bin/node\r\n    Yarn: 1.7.0 - /usr/bin/yarn\r\n    npm: 5.6.0 - /usr/bin/npm\r\n  npmPackages:\r\n    jest: ^23.1.0 => 23.1.0 \r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/jest/issues/comments/403827423","html_url":"https://github.com/facebook/jest/issues/6668#issuecomment-403827423","issue_url":"https://api.github.com/repos/facebook/jest/issues/6668","id":403827423,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzgyNzQyMw==","user":{"login":"retyui","id":4661784,"node_id":"MDQ6VXNlcjQ2NjE3ODQ=","avatar_url":"https://avatars1.githubusercontent.com/u/4661784?v=4","gravatar_id":"","url":"https://api.github.com/users/retyui","html_url":"https://github.com/retyui","followers_url":"https://api.github.com/users/retyui/followers","following_url":"https://api.github.com/users/retyui/following{/other_user}","gists_url":"https://api.github.com/users/retyui/gists{/gist_id}","starred_url":"https://api.github.com/users/retyui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/retyui/subscriptions","organizations_url":"https://api.github.com/users/retyui/orgs","repos_url":"https://api.github.com/users/retyui/repos","events_url":"https://api.github.com/users/retyui/events{/privacy}","received_events_url":"https://api.github.com/users/retyui/received_events","type":"User","site_admin":false},"created_at":"2018-07-10T13:45:11Z","updated_at":"2018-07-10T13:45:11Z","author_association":"NONE","body":"@SimenB\r\nI also ran on the macbook, the problem remained\r\nhttps://gist.github.com/retyui/38014a1e68c09e9ac9f73d6c58b0b935"}}
{"actor":{"display_login":"retyui"}}