-
Notifications
You must be signed in to change notification settings - Fork 8
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
vscode-test-cli
not excluding files from coverage report
#40
Comments
I am experiencing the same behavior. Files are not excluded from coverage report (they are when c8 is called from command line instead) |
@g-arjones I found doing this produced a better coverage report! But I wish there was a simpler way to have this setup since it still doesn't provide all the proper files: import { defineConfig } from "@vscode/test-cli";
import { fileURLToPath } from "url";
import { dirname } from "path";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
/** @type {import('@vscode/test-cli').IConfigurationWithGlobalOptions} */
export default defineConfig({
/** @type {import('@vscode/test-cli').TestConfiguration[]} */
tests: [
{
files: "./__tests__/__integration__/out/**/*.test.js",
version: "stable",
extensionDevelopmentPath: __dirname,
workspaceFolder: `${__dirname}/__tests__/__integration__/resources`,
srcDir: "./__tests__/__integration__/out/src",
mocha: {
timeout: 5000,
},
},
],
coverage: {
exclude: [
`${__dirname}/out`,
`${__dirname}/__tests__/__integration__/out/__tests__`,
],
},
}); |
Yep. That does work indeed. |
is there any update? |
Any update on this? I have a extension that is packed with webpack and it gives me the import { defineConfig } from "@vscode/test-cli";
export default defineConfig({
files: ["out/test/suite/**/*.test.js"],
version: "insiders",
workspaceFolder: "./out/temp/workspace",
launchArgs: ["--disable-extensions", "--profile-temp"],
coverage: {
exclude: ["dist", "**/dist/**", /dist/],
},
}); used vscode-test-cli version: 0.0.10 |
I wonder if this is related to this line? vscode-test-cli/src/cli/coverage.mts Line 70 in ca11885
That would jive with the workaround here #40 (comment) For now if you fully qualify the paths in your coverage.exclude then they are properly excluded. |
I have the following configuration file:
And I am unable to generate a coverage report that excludes my node_modules event though I specifically mention to exclude those in
coverage.exclude
any idea if i'm missing something in my configuration?The text was updated successfully, but these errors were encountered: