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>
29 lines
702 B
TypeScript
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'),
|
|
}
|
|
}
|
|
});
|