Files
biggus-dickus/web/vite.config.ts
logaritmisk e8fe24f755
CI / web (push) Failing after 3m50s
ci: raise vitest testTimeout to 20s for the resource-constrained runner
The 'narrow: detail renders inside a portaled drawer' test lazy-loads the
drawer chunk and exceeded the 5s default on the slow CI container (setup
alone took ~486s). Bump testTimeout on both vitest projects.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 11:44:30 +02:00

64 lines
1.9 KiB
TypeScript

/// <reference types="vitest/config" />
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import path from "node:path";
import { defineConfig } from "vite";
import { fileURLToPath } from 'node:url';
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
import { playwright } from '@vitest/browser-playwright';
const dirname = typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
// More info at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src")
}
},
server: {
proxy: {
"/api": "http://localhost:8080",
"/api-docs": "http://localhost:8080",
"/health": "http://localhost:8080"
}
},
test: {
projects: [{
extends: true,
test: {
environment: "jsdom",
// The CI runner is heavily resource-constrained; lazy-loaded chunks
// (e.g. the object-detail drawer) can exceed the 5s default.
testTimeout: 20000,
globals: true,
setupFiles: ["./src/test/setup.ts"],
environmentOptions: {
jsdom: {
url: "http://localhost"
}
}
}
}, {
extends: true,
plugins: [
// The plugin will run tests for the stories defined in your Storybook config
// See options at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon#storybooktest
storybookTest({
configDir: path.join(dirname, '.storybook')
})],
test: {
name: 'storybook',
testTimeout: 20000,
browser: {
enabled: true,
headless: true,
provider: playwright(),
instances: [{
browser: 'chromium'
}]
}
}
}]
}
});