Giter Site home page Giter Site logo

Comments (9)

cbracken avatar cbracken commented on September 21, 2024

@jacob314 for package:js. Not familiar with the implementation of dart:js in Dartium, but is it possible we're not generating hits in cases like this?

from coverage.

jacob314 avatar jacob314 commented on September 21, 2024

That case would be really hard to support in Dartium. The problem is in that behind the scenes Dartium is implementing TestMe with noSuchMethod so the "external int returnFive()" isn't really being called. I'd recommend ignoring external methods when tracking your code coverage. DDC should be a much better job at tracking code coverage across the dart-JS boundary.

from coverage.

cadencefinch-wf avatar cadencefinch-wf commented on September 21, 2024

@jacob314 What are you referring to with DDC?

from coverage.

zoechi avatar zoechi commented on September 21, 2024

https://github.com/dart-lang/dev_compiler

from coverage.

cbracken avatar cbracken commented on September 21, 2024

The current implementation of coverage puts any given line in one of three states:

  • Hit
  • Miss
  • Not coverable

If we can't support marking external lines as hit, we should at least ensure that they're not coming back as a miss.

@brettonfinch-wf can you clarify whether the line is coming back with a hit count of 0 (miss) or not included in the generated coverage at all (not coverable)?

from coverage.

cadencefinch-wf avatar cadencefinch-wf commented on September 21, 2024

The lines are coming back with a hit count of 0, my project uses CodeCov and it reports those lines as red (missed)

from coverage.

cbracken avatar cbracken commented on September 21, 2024

Alright - sounds like if it's going to be too painful to get Dartium fixed, in particular with DDC coming, then marking em as un-coverable sounds like the way to go for now. Thanks for confirming!

from coverage.

cadencefinch-wf avatar cadencefinch-wf commented on September 21, 2024

Alright, that sounds good to me, thanks for confirming this!

from coverage.

cbracken avatar cbracken commented on September 21, 2024

Closing as obsolete now that Dartium support is gone. dart-lang/test#36 tracks coverage for Dart for Web scenarios.

from coverage.

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.