setupFiles and setupFilesAfterEnv are included in coverage report. global{Setup,Teardown} are not included as expected.
I don't think this is expected, but if it is please close this issue. I'll just add the necessary files to coveragePathIgnorePatterns.
Enable setupFiles and setupFilesAfterEnv and run coverage report.
setupFiles and setupFilesAfterEnv are not shown in coverage report.
npx envinfo --preset jestPaste the results here:
System:
OS: macOS 10.14.3
CPU: (16) x64 Intel(R) Xeon(R) W-2140B CPU @ 3.20GHz
Binaries:
Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.13.0/bin/npm
npmPackages:
jest: 24.0.0 => 24.0.0
I guess it could be argued that setupFiles{,afterEnv} are somewhat close to beforeAll and could thus be considered part of each test file, but I don't really have a strong opinion whether they should be. Not sure if there's any significant pros or cons to including them?
I think they, like test files, should by default be ignored by coverage. PR welcome 馃檪
I鈥檇 love to tackle this if you dont mind 馃
Go for it! 馃檪
Most helpful comment
I鈥檇 love to tackle this if you dont mind 馃