mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-10-29 03:36:15 +08:00
Add per-row and 'refresh all' buttons to the RSS page, wired through new store actions refreshRSS/refreshAllRSS backed by apiRSS.refresh(All). Fix vitest.config.ts's auto-import dirs being out of sync with vite.config.ts, which silently made every src/api/*.ts contract test a no-op (bare axios/apiXxx identifiers threw under vitest, so the specs never called real code). Add a shared axios mock helper and give every src/api/*.ts module a real contract test asserting path + method against the mocked axios instance and cross-checked against the FastAPI routers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTnuEgR78cBk32bLNKar3z
40 lines
939 B
TypeScript
40 lines
939 B
TypeScript
import { resolve } from 'node:path';
|
|
import { defineConfig } from 'vitest/config';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import AutoImport from 'unplugin-auto-import/vite';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
AutoImport({
|
|
imports: ['vue', 'vitest', 'pinia'],
|
|
dirs: ['src/api', 'src/store', 'src/hooks', 'src/utils'],
|
|
dts: false,
|
|
}),
|
|
],
|
|
test: {
|
|
environment: 'happy-dom',
|
|
globals: true,
|
|
setupFiles: ['./src/test/setup.ts'],
|
|
include: ['src/**/*.{test,spec}.{js,ts}'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html'],
|
|
include: ['src/**/*.{ts,vue}'],
|
|
exclude: [
|
|
'src/test/**',
|
|
'src/**/*.d.ts',
|
|
'src/main.ts',
|
|
'src/router/**',
|
|
],
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'~': resolve(__dirname, './'),
|
|
'@': resolve(__dirname, 'src'),
|
|
'#': resolve(__dirname, 'types'),
|
|
},
|
|
},
|
|
});
|