- Add vitest with solid plugin, coverage, jsdom environment - Create MSW mocks for API responses in test setup - Add unit test for ProfessionAdminListPage - Add Playwright accessibility and visual regression configs - Add sample accessibility and visual tests - Add ESLint + Prettier configs with SolidJS rules - Update scripts: test, test:coverage, test:accessibility, test:visual - Add .gitignore entries for coverage, test-results, playwright-report, .vitest - Install required dev dependencies: vitest, @solidjs/testing-library, msw, eslint, prettier, typescript, @axe-core/playwright, etc. - Create .github/workflows/ci.yml with lint, test, coverage, e2e, accessibility, visual checks This sets up full testing pipeline for admin frontend.
18 lines
547 B
TypeScript
18 lines
547 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import solid from 'vitest-plugin-solid';
|
|
|
|
export default defineConfig({
|
|
plugins: [solid()],
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: ['./src/test/setup.ts'],
|
|
include: ['src/**/*.{test,spec}.{js,mjs,ts,tsx}', 'tests/vitest/**/*.spec.ts'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html', 'lcov'],
|
|
reportsDirectory: './test-results/vitest-coverage',
|
|
exclude: ['node_modules', 'dist', '.output', '**/*.d.ts'],
|
|
},
|
|
},
|
|
});
|