Git Product home page Git Product logo

Comments (19)

wagenet avatar wagenet commented on July 23, 2024 1

@sglanzer it's the code name for https://www.skylight.io :)

from ember-cli-code-coverage.

rwjblue avatar rwjblue commented on July 23, 2024

Interesting. This is likely a result of the modules being lazily resolved, so if you do not import a given module or force to evaluate it (via visiting a route or invoking a component) it wouldn't be reported.

@sandersky / @kategengler / @sglanzer - Can one of y'all confirm this? I can add a thing that basically requires all app files (to ensure they are being evaluated) if that is the case...

from ember-cli-code-coverage.

sglanzer-deprecated avatar sglanzer-deprecated commented on July 23, 2024

@rwjblue yeah, that's what we did in blanket (required everything in the app directory)

from ember-cli-code-coverage.

wagenet avatar wagenet commented on July 23, 2024

I'd be happy to give this a shot.

from ember-cli-code-coverage.

adhamhf avatar adhamhf commented on July 23, 2024

Is there a work around to get all files tested until a new release happens?

Also, would this also include .hbs files? I'm noting their is logic them that is not necessarily getting covered....

from ember-cli-code-coverage.

sglanzer-deprecated avatar sglanzer-deprecated commented on July 23, 2024

Coverage typically would include .hbs files, but the mapping is based on compiled templates (HTMLbars), so it doesn't always look pretty ;)

from ember-cli-code-coverage.

sglanzer-deprecated avatar sglanzer-deprecated commented on July 23, 2024

@wagenet did you get anywhere on this? I have a few devs that are going to start picking up the work around addon testing and we could take a look at this as well

from ember-cli-code-coverage.

wagenet avatar wagenet commented on July 23, 2024

@sglanzer didn't end up getting beyond a hack in my own app.

from ember-cli-code-coverage.

wagenet avatar wagenet commented on July 23, 2024

I added the following to my tests/index.html after the <script src="assets/test-loader.js"></script> line.

    <script>
      Testem.afterTests(function() {
        if (window.__coverage__) {
          Object.keys(require.entries).forEach(function(file) {
            // Only load non-test files from our app
            var parts = file.split('/');
            if (parts[0] === 'direwolf' && parts[1] !== 'tests') {
              try {
                require(file);
              } catch(e) {
                throw 'error requiring file for coverage: '+file;
              }
            }
          });
        }
      });
    </script>

(direwolf is the app's name.)

from ember-cli-code-coverage.

sglanzer-deprecated avatar sglanzer-deprecated commented on July 23, 2024

@EWhite613 is going to start picking up some of this work - pinging him here to start involvement

Also @wagenet wins the app name of the month - I would want to work on a project with a name like that 👍

from ember-cli-code-coverage.

fotinakis avatar fotinakis commented on July 23, 2024

Happy to beta test this when ready — I just switched a large Ember app from ember-cli-blanket to this addon, coverage jumped from 55% to 85% due to this issue.

from ember-cli-code-coverage.

benoror avatar benoror commented on July 23, 2024

+1 same here

On Mon, Aug 8, 2016, 18:15 Mike Fotinakis [email protected] wrote:

Happy to beta test this when ready — I just switched a large Ember app
from ember-cli-blanket to this addon, coverage jumped from 55% to 85% due
to this issue.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#20 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHRTW6SgUEo3gMdYtsAjfQGOTPJ3f_Hks5qd7iugaJpZM4JCJZS
.

_Ben Orozco_Website: benoror.com
Appointments: vyte.in/benoror

from ember-cli-code-coverage.

EWhite613 avatar EWhite613 commented on July 23, 2024

I got to the point where I basically store file patterns in config/coverage.js and would read in the files, but was never able to produce a coverage object (Istanbul's api documentation leaves something to be desired)so I could add it to the coverage report.

My only working solution was to merge the untested broccoli trees in, but I wasn't happy with that approach.

from ember-cli-code-coverage.

mike183 avatar mike183 commented on July 23, 2024

I'm also running into this issue, I currently have an application with 0 tests (I know...terrible), but it's reporting back as 100% code coverage! 😅

from ember-cli-code-coverage.

fotinakis avatar fotinakis commented on July 23, 2024

This is how blanket-require.js does it, apparently:
https://github.com/sglanzer/ember-cli-blanket/blob/e7e80913b10e8b38863ff57a0cfa3c41daa2c810/vendor/blanket-require.js#L103

from ember-cli-code-coverage.

sglanzer-deprecated avatar sglanzer-deprecated commented on July 23, 2024

We're funky like that - just not sure if those concepts carry forward into the best practice version of a code coverage addon - someone else will need to make that call, my brain hasn't been in this space for a while

from ember-cli-code-coverage.

fotinakis avatar fotinakis commented on July 23, 2024

👍 I like it, I'm up for anything that fixes this. :)

from ember-cli-code-coverage.

sglanzer-deprecated avatar sglanzer-deprecated commented on July 23, 2024

I'll try to find some time next week to sync with @rwjblue and @kategengler - probably should put together a roadmap for this and the addon coverage issues

from ember-cli-code-coverage.

lolmaus avatar lolmaus commented on July 23, 2024

@rwjblue @wagenet @kategengler You rock!

rock

from ember-cli-code-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.