Code Monkey home page Code Monkey logo

Comments (7)

Vinnl avatar Vinnl commented on September 13, 2024 3

I've been trying to wrap my head around the current status of this, and I thought it'd be a good idea to jot down my current conclusions (both to inform others, and to double-check any incorrect assumptions I've made).

So, as far as I can tell, it is currently impossible for ts-jest to tell Jest what the correct coverage is (although it can output the correct coverage to the developer, [currently])(#61) in the remapped directory inside the coverage directory configured for Jest).

However, a PR has been accepted into Jest that should make this possible in the future. If the developer enables the mapCoverage option, then from Jest 20 onwards (we're at version 19 at the time of writing), ts-jest and other preprocessors should be able to report the actual coverage back to Jest. Or at least, the actual coverage as far as the source maps are accurate, which should be fine most of the time.

So for now, we'll have to wait for Jest 20, after which ts-jest can be extended to report the coverage back to Jest.

As a workaround until that time, I've created a small CLI-tool that you can point at your remapped coverage report to pass or fail a CI build depending on whether thresholds are met.

from ts-jest.

kwonoj avatar kwonoj commented on September 13, 2024 1

refer #42 (comment) .

from ts-jest.

Pickra avatar Pickra commented on September 13, 2024 1

Thanks for the update on this issue @kulshekhar

from ts-jest.

Pickra avatar Pickra commented on September 13, 2024

Thanks for the quick response. Sorry for the repeat question.

from ts-jest.

Pickra avatar Pickra commented on September 13, 2024

Thanks for the update and work around, much appreciated.

from ts-jest.

kulshekhar avatar kulshekhar commented on September 13, 2024

Coverage is no longer handled by ts-jest (see #200)

If this issue isn't addressed AND if you think the fix needs to be in ts-jest, feel free to either open a new issue or leave a comment here to reopen this.

from ts-jest.

screendriver avatar screendriver commented on September 13, 2024

Unfortunately it does not work at the moment: #211

from ts-jest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.