Comments (19)
@sglanzer it's the code name for https://www.skylight.io :)
from ember-cli-code-coverage.
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 visit
ing 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.
@rwjblue yeah, that's what we did in blanket (required everything in the app directory)
from ember-cli-code-coverage.
I'd be happy to give this a shot.
from ember-cli-code-coverage.
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.
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.
@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.
@sglanzer didn't end up getting beyond a hack in my own app.
from ember-cli-code-coverage.
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.
@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.
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.
+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.
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.
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.
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.
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.
👍 I like it, I'm up for anything that fixes this. :)
from ember-cli-code-coverage.
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.
@rwjblue @wagenet @kategengler You rock!
from ember-cli-code-coverage.
Related Issues (20)
- TS files are not included in the coverage with `--path` option HOT 2
- Dramatic build slowdown when enabled HOT 3
- Question - Is there a way to fail the test run if the coverage is below a certain threshold?
- Request aborted - BadRequestError seen from v2.0.0-beta.2 HOT 6
- write-coverage errors out with 403
- Seems to break when using the ember-concurrency new api HOT 5
- Unexpected token { error
- [QUERY] Is it possible to generate the coverage for a specific file/spec module (integration) HOT 2
- Issue with migration to v2.0.0
- No coverage report generated when used with @embroider/compat@^2.1.0 HOT 10
- Exclude app files from ember engine? tried with many glob patterns nothing is working..
- Socket timeouts POSTing to /write-coverage when running tests in CI mode HOT 3
- Not respecting "inputSourceMap" field from reported coverage data (fails for .gjs - ember-template-imports) HOT 2
- New release? HOT 10
- Coverage not collected in Embroider >3.1 HOT 6
- Is it possible to get coverage of hbs files with qunits and this coverage tool? HOT 1
- Issues with first-class component templates? HOT 12
- Embroider Tests are verifying that we have no coverage data HOT 1
- Version 2.0.1 not published HOT 1
- Coverage fails in dev mode (ember serve) on 2.0.3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-code-coverage.