- Add src/lib/components/JobErrorLine.svelte: reusable error banner with icon, truncated message, accent retry and danger delete buttons; Svelte 5 runes; WCAG AA (role=alert/status, aria-busy, aria-label, focus ring) - Integrate into src/routes/+page.svelte: replace .recent-err-line div with JobErrorLine; add handleRetry function updating jobs array in-place - Integrate into src/routes/jobs/+page.svelte: remove inline .job-err-inline and .row-retry-slot; add JobErrorLine inside .job-info for failed/cancelled; refactor retryJobById/deleteJobById with clean (jobId: string) signatures; done-job delete preserved in row-actions - Add src/tests/job-error-line.test.ts: 8 component rendering tests via @testing-library/svelte + happy-dom covering message, buttons, callbacks, fallback text, and ARIA roles - Install @testing-library/svelte@5 and happy-dom as devDeps for component test support; update vitest.config.ts with svelte plugin, happy-dom env match glob, and browser resolve condition for Svelte 5 client build Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
28 lines
620 B
TypeScript
28 lines
620 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')
|
|
}
|
|
}
|
|
});
|