Skip to content

Commit c0a95ff

Browse files
jcfrancobenelan
authored andcommitted
chore: fix test include/exclude (#12019)
1 parent aa89d32 commit c0a95ff

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/calcite-components/vite.config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import stylelint from "stylelint";
55
// TODO: [MIGRATION] evaluate the usages of the key={} props - most of the time key is not necessary in Lit. See https://qawebgis.esri.com/arcgis-components/?path=/docs/lumina-jsx--docs#key-prop
66
import { defineConfig } from "vite";
77
import { useLumina } from "@arcgis/lumina-compiler";
8+
import { defaultExclude } from "vitest/config";
89
import { version } from "./package.json";
910
import tailwindConfig from "./tailwind.config";
1011

@@ -14,8 +15,7 @@ const runBrowserTests = process.env.EXPERIMENTAL_TESTS === "true";
1415
const allDirsAndFiles = "**/*";
1516
const specAndE2EFileExtensions = `{e2e,spec}.?(c|m)[jt]s?(x)`;
1617
const browserTestMatch = `${allDirsAndFiles}.browser.${specAndE2EFileExtensions}`;
17-
const allSpecAndE2ETestMatch = `${allDirsAndFiles}.${specAndE2EFileExtensions}}`;
18-
const noBrowserTestMatch = `!${browserTestMatch}}`;
18+
const allSpecAndE2ETestMatch = `${allDirsAndFiles}.${specAndE2EFileExtensions}`;
1919

2020
export default defineConfig({
2121
build: { minify: false },
@@ -103,7 +103,8 @@ export default defineConfig({
103103

104104
test: {
105105
browser: { enabled: runBrowserTests, name: "chromium", provider: "playwright", screenshotFailures: false },
106-
include: runBrowserTests ? [browserTestMatch] : [noBrowserTestMatch, allSpecAndE2ETestMatch],
106+
include: runBrowserTests ? [browserTestMatch] : [allSpecAndE2ETestMatch],
107+
exclude: runBrowserTests ? undefined : [...defaultExclude, browserTestMatch],
107108
passWithNoTests: true,
108109
setupFiles: ["src/tests/setupTests.ts"],
109110
},

0 commit comments

Comments
 (0)