Files
tonemark/vitest.config.ts
T
Giancarmine SalucciandClaude Sonnet 4.6 60782001e0
Build & Push Docker Image / test (push) Failing after 16s
Build & Push Docker Image / build-and-push (push) Has been skipped
fix(baseline): restore browser resolve conditions + fix onDelete handler type
4ca532b accidentally dropped vitest.config.ts browser resolve conditions,
environmentMatchGlobs, and hot:false — causing job-error-line.test.ts to
mount against svelte/index-server.js and fail with lifecycle_function_unavailable.
Also fixes JobErrorLine.svelte line 45: onDelete passed directly as onclick
is typed (jobId:string)=>void, not MouseEventHandler — wrap to match handler
signature, consistent with the failed-branch delete button already there.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 17:00:47 +02:00

29 lines
702 B
TypeScript

import { defineConfig } from 'vitest/config';
import { svelte } from '@sveltejs/vite-plugin-svelte';
import path from 'path';
export default defineConfig({
plugins: [svelte({ hot: false })],
test: {
environment: 'node',
globals: true,
fileParallelism: false,
include: ['src/tests/**/*.test.ts'],
environmentMatchGlobs: [
['**/job-error-line.test.ts', 'happy-dom']
],
coverage: {
provider: 'v8',
reporter: ['text', 'html'],
include: ['src/lib/server/**/*.ts', 'src/routes/api/**/*.ts']
}
},
resolve: {
conditions: ['browser'],
alias: {
'$lib': path.resolve('./src/lib'),
'$app/environment': path.resolve('./src/tests/__mocks__/app-environment.ts'),
}
}
});