You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
When running jest with jest --watch, and I save line.test.js it shows 100% statement, branch, function and line coverage for Point.js. That in itself isn't too weird because Point is used whilst testing Line. That is to say one Line is composed of two Point (like high school geometry). See below:
In that screenshot it's also showing 100% coverage for parts of the code that are not currently touched by my tests....(for example pureimage.js and named_colors.js). It's almost like it's just picking things at random...
If I run the tests normally with jest things work perfectly and I get results more along the lines of what I would expect(though it's still saying I have 100% coverage in files I have never touched)
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.
What is the expected behavior?
If I'm running with --watch (and not --watchAll) it should only report coverage for the things I'm testing/using
It shouldn't be reporting 100% coverage on files that I haven't even touched...
Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
robertmain
changed the title
Jest generates seemingly random coverage data
Jest reports coverage data on files that haven't been touched in the tests
Dec 1, 2017
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
When running jest with
jest --watch
, and I save line.test.js it shows 100% statement, branch, function and line coverage for Point.js. That in itself isn't too weird becausePoint
is used whilst testingLine
. That is to say oneLine
is composed of twoPoint
(like high school geometry). See below:In that screenshot it's also showing 100% coverage for parts of the code that are not currently touched by my tests....(for example
pureimage.js
andnamed_colors.js
). It's almost like it's just picking things at random...If I run the tests normally with
jest
things work perfectly and I get results more along the lines of what I would expect(though it's still saying I have 100% coverage in files I have never touched)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
andyarn test
.What is the expected behavior?
--watch
(and not--watchAll
) it should only report coverage for the things I'm testing/usingPlease provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
Node: 8.4.0
NPM: 5.3.0
Jest: 21.2.1
Installed Packages:
Repo Link: https://github.com/robertmain/node-pureimage
The text was updated successfully, but these errors were encountered: