Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it work with multiple thresholds #6

Open
icatalina opened this issue Apr 10, 2022 · 4 comments
Open

Make it work with multiple thresholds #6

icatalina opened this issue Apr 10, 2022 · 4 comments

Comments

@icatalina
Copy link

 coverageThreshold: {
    global: {
      branches: 100,
      functions: 100,
      lines: 100,
      statements: 100,
    },
    './src/path1': {
      branches: 55,
      functions: 60,
      lines: 59,
      statements: 60,
    },
    './src/path2': {
      branches: 100,
      functions: 100,
      lines: 100,
      statements: 100,
    },
  },
Ignoring "lines" coverage threshold because new value 29.75 is less or equal to current value 100.
Ignoring "statements" coverage threshold because new value 30.2 is less or equal to current value 100.
Ignoring "branches" coverage threshold because new value 21.72 is less or equal to current value 100.
Ignoring "functions" coverage threshold because new value 21.53 is less or equal to current value 100.
@Litee
Copy link
Owner

Litee commented Apr 21, 2022

That's a non-trivial one. It is easier to implement for JSON config format, but might be much harder for JS one. I cannot promise to implement it soon (not much free time), but will keep in my todo list.

@c4ss
Copy link

c4ss commented Jun 17, 2022

For JS/TS config files the library can manage a generated JSON file, which is required to be imported into the jest config for full functionality

@JohnDuncanScott
Copy link

This package is probably the best of the "jest bumpers" given how well it works with the various ways Jest can be configured and how simple it is to use. Not being able to handle multiple thresholds is a blocker unfortunately because the global values it calculates are incorrect in this case :(.

@c4ss
Copy link

c4ss commented Jun 20, 2022

Would be a lot simpler if istanbul supported more groups than "global". If it could be configured to report for jest projects as well as global that would massively reduce the logic required in this package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants