From 631edee176ecd241a1a3186068826a83dd160408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Exbrayat?= Date: Fri, 28 Jan 2022 10:53:45 +0100 Subject: [PATCH] feat: ignore cypress files in coverage by default Projects using Cypress often have e2e spec files in a `cypress` directory that currently needs to be manually ignored. This is the case for `create-vue` projects for example. This commit adds `cypress/**` to the default excludes of the code coverage config. --- packages/vitest/src/integrations/coverage.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/vitest/src/integrations/coverage.ts b/packages/vitest/src/integrations/coverage.ts index 3730c5c56419..d2b00b52a430 100644 --- a/packages/vitest/src/integrations/coverage.ts +++ b/packages/vitest/src/integrations/coverage.ts @@ -10,6 +10,7 @@ const defaultExcludes = [ 'coverage/**', 'packages/*/test{,s}/**', '**/*.d.ts', + 'cypress/**', 'test{,s}/**', 'test{,-*}.{js,cjs,mjs,ts,tsx,jsx}', '**/*{.,-}test.{js,cjs,mjs,ts,tsx,jsx}',