This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 197
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fe8fe59
to
b51795e
Compare
- nyc only supports code coverage in node, however we have a number of browser based tests, and it is the primary use case, so we have decided to do the code coverage in karma. - the karma.conf.js previously used the pre-bundled test bundle, but this doesn't give us the code coverage per line number, I could have tried to find a way to remap the bundle to lines, but because the karma-typescript project is well maintained, I went this road. This however means there is a lot of configuration to get the tests running correctly, especially those that need to load resources. - note also, there are quite a few tests that time out when run in the browser, hence the need to change the timeout in some cases - note also, karma outputs the code coverage format using lcov, this is different to nyc and means that the code coverage drops a lot, this is because the lcov format can tell if a line is fully covered, i.e. for an if statement, it records if both true and false variants are executed. As such, lines without full branch coverage are treated as not covered, and this reduces the code coverage in the codecov.io report available via github. The local text report which is shown when running `yarn cov-test` doesn't have this behaviour, i.e lines that have just one branch executed are counted as part of the code coverage. Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
…nd extend the configuration Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## master #2173 +/- ##
==========================================
- Coverage 68.44% 66.64% -1.80%
==========================================
Files 299 312 +13
Lines 26526 27745 +1219
Branches 6009 6199 +190
==========================================
+ Hits 18156 18491 +335
- Misses 8370 9254 +884
Continue to review full report at Codecov.
|
Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
Closing / reopening to retrigger sdk pipeline. |
… are better to compare Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
dbacarel
reviewed
Apr 30, 2021
Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
it is from MapBox, anything ending with node.ts or index*.ts, or anything which is in a test/ directory Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
dbacarel
approved these changes
May 4, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
yarn cov-test
doesn't have this behaviour, i.e lines that have just one branch executed are counted as part of the code coverage.karma.conf.js
tokarma.options.js
, so it can be shared and extended with the sdk and added the ability to prefix the files / exclude so that this repo works next to the sdk correctly.