DenoDDeno
Powered by
KyleJuneK
Denoβ€’4y agoβ€’
13 replies
KyleJune

How to exclude vendor directory from test coverage?

https://deno.land/manual@v1.25.4/testing/coverage
Here it says by default it will exclude
test\.(ts|tsx|mts|js|mjs|jsx|cjs|cts)
test\.(ts|tsx|mts|js|mjs|jsx|cjs|cts)
and only include specifiers matching
^file:
^file:
. If I wanted to keep the current behavior but also exclude my vendor directory how would I do that?
Before this I tried excluding them from codecov by using the following
codecov.yml
codecov.yml
in my
.github
.github
directory but it didn't work and still shows coverage for my vendor directory.
comment: false
codecov:
  require_ci_to_pass: true
coverage:
  status:
    project:
      default:
        informational: true
ignore:
  - "vendor/**/*"
  - "public/**/*"
comment: false
codecov:
  require_ci_to_pass: true
coverage:
  status:
    project:
      default:
        informational: true
ignore:
  - "vendor/**/*"
  - "public/**/*"

Here is the documentation where it says how to ignore paths in codecov. I've also tried just doing
vendor
vendor
but that didn't work either.
https://docs.codecov.com/docs/ignoring-paths
Since I couldn't get codecov to ignore it correctly, I want to try getting deno coverage to instead.
unknown.png
Codecov
Ignoring Paths
You can use the top-level ignore: key to tell Codecov to ignore certain paths. Add a list of paths (folders or file names) to your codecov.yml file under the ignore key to exclude files from being collected by Codecov. Ignored files will be skipped during processing. The following are examples of di...
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Exclude packages from test coverage
KotkoroidKKotkoroid / help
16mo ago
Before generating coverage report, run `deno test --coverage` to ensure consistent state.
texasrangerTtexasranger / help
4y ago
How to exclude folder from deno lint
karolskolasinskiKkarolskolasinski / help
3y ago