N
Nuxt9mo ago
oneeach

Nuxt/Vitest coverage report does not include server folder

import { defineVitestConfig } from "@nuxt/test-utils/config";

export default defineVitestConfig({
test: {
globals: true,
environment: "nuxt",
coverage: {
provider: "v8",
all: true,
reporter: ["html", "text"],
},
environmentOptions: {
nuxt: {
mock: {
intersectionObserver: true,
indexedDb: true,
},
},
},
},
resolve: {
alias: {
"~": "/",
"~~": ".",
},
},
});
import { defineVitestConfig } from "@nuxt/test-utils/config";

export default defineVitestConfig({
test: {
globals: true,
environment: "nuxt",
coverage: {
provider: "v8",
all: true,
reporter: ["html", "text"],
},
environmentOptions: {
nuxt: {
mock: {
intersectionObserver: true,
indexedDb: true,
},
},
},
},
resolve: {
alias: {
"~": "/",
"~~": ".",
},
},
});
No description
2 Replies
oneeach
oneeachOP9mo ago
I am trying to run vitest run --coverage but my report doesn't seem to include anything within the server folder. How can I get it to include those files?
Charlie
Charlie3mo ago
@oneeach did you manage to get the coverage for server? I'm struggling with the same problem
Want results from more Discord servers?
Add your server