Fix tests after ts change
CI Pipeline / test (20) (pull_request) Successful in 2m41s
CI Pipeline / test (18) (pull_request) Successful in 3m21s
CI Pipeline / e2e (chromium) (pull_request) Failing after 1m25s
CI Pipeline / e2e (firefox) (pull_request) Failing after 1m24s
CI Pipeline / e2e (webkit) (pull_request) Failing after 1m24s
CI Pipeline / visual-regression (pull_request) Failing after 1m53s
CI Pipeline / performance (pull_request) Failing after 1m31s
CI Pipeline / lint (pull_request) Failing after 1m5s
CI Pipeline / storybook (pull_request) Successful in 1m36s
CI Pipeline / build (pull_request) Failing after 1m19s

This commit is contained in:
adilallo
2025-12-10 22:43:36 -07:00
parent f6a0673082
commit 92a3337aeb
65 changed files with 262 additions and 313 deletions
+21 -3
View File
@@ -1,11 +1,27 @@
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import path from "path";
import { fileURLToPath } from "url";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
plugins: [react({ jsxRuntime: "automatic" })],
plugins: [
react({ jsxRuntime: "automatic" }),
// Transform CSS imports to empty modules to avoid jsdom parsing errors
{
name: "css-mock",
load(id) {
if (id.endsWith(".css")) {
return "export default {};";
}
},
},
],
esbuild: {
target: "node18",
jsx: "automatic",
loader: "jsx",
loader: "tsx",
include: /\.[jt]sx?$/,
exclude: [/node_modules/],
},
@@ -22,7 +38,9 @@ export default defineConfig({
"tests/e2e/**/*.storybook.test.{js,jsx,ts,tsx}",
"tests/e2e/**/*.spec.{js,jsx,ts,tsx}",
],
css: true,
// Disable CSS processing in tests to avoid jsdom parsing errors with Tailwind v4
// Tailwind classes are still available via JIT compilation
css: false,
coverage: {
provider: "v8",
reporter: ["text", "lcov"],