-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add excludeAfterRemap
option for c8 coverage
#3818
Comments
The |
This issue relates to |
@AriPerkkio I was going off this quote from #3339
My assumption being that the |
The Doesn't |
This is the // ...
export default defineConfig({
plugins: [tsconfigPaths()],
test: {
include: [testFilePattern],
coverage: {
provider: "c8",
include: ["src/**/*.ts"],
exclude: ["src/util/conditional-imports/**/*.ts"],
// @ts-expect-error -- Untyped option.
excludeAfterRemap: true,
clean: true,
reporter: ["lcov", "text"],
watermarks: {
lines: [80, 95],
functions: [80, 95],
branches: [80, 95],
statements: [80, 95],
},
},
},
}); With this config, the coverage result look like this: If I remove If I also remove the |
Here's a link to the repo if you want to have a look there: https://github.com/eslint-functional/eslint-plugin-functional/tree/next |
https://github.com/istanbuljs/nyc/blob/ab7c53b2f340b458789a746dff2abd3e2e4790c3/index.js#L439 |
Clear and concise description of the problem
The option --exclude-after-remap can't currently be set in
vite.config.ts
.Suggested solution
Add
excludeAfterRemap
as an option to thetest.coverage
config for providerv8
.Alternative
Use the
c8
provider or run vitest asc8 vitest run
and a.c8rc.json
config file.Additional context
The
c8
provider currently supportsexcludeAfterRemap
but TypeScript complains about it not being a valid option.Also: #3813
Validations
The text was updated successfully, but these errors were encountered: