Files
LivingDexTracker/vitest.config.mts
T
Josh Creek 7786d46078 fix(backup): don't let a stale export pause a reconnected backup
- An export now pauses a revoked integration only if its row is
  unchanged since the export read it, using the trigger-maintained
  updatedAt column as the row version. If the user reconnected in the
  meantime, the stale failure no longer disables the fresh credentials
  or asks the user to reconnect again. updateExportStatus now reports
  whether a row was written.
- The backup status store ignores a response overtaken by a newer
  refresh, or by the status being flagged, cleared or set directly, so
  a slow response can't overwrite newer state.
- Unit tests cover the whole integration repository, the guarded pause
  and stale status responses. Coverage thresholds are raised to the
  new baseline.
2026-09-14 19:03:29 +01:00

33 lines
1.0 KiB
TypeScript

import { defineConfig } from 'vitest/config';
import { fileURLToPath } from 'node:url';
export default defineConfig({
resolve: {
alias: {
$lib: fileURLToPath(new URL('./src/lib', import.meta.url)),
'$env/dynamic/private': fileURLToPath(new URL('./tests/support/envStub.ts', import.meta.url))
}
},
test: {
allowOnly: false,
include: ['tests/unit/**/*.test.ts', 'tests/data/**/*.test.ts'],
coverage: {
provider: 'v8',
reporter: ['text', 'json-summary', 'html'],
reportsDirectory: 'coverage',
// The whole library surface is measured, so anything new and untested drags the
// numbers down instead of being invisible to the gate. Excluded here: type-only
// models, and the store/action modules that only run in a browser.
include: ['src/lib/**/*.ts'],
exclude: ['src/lib/models/**', 'src/lib/stores/**', 'src/lib/actions/**'],
// Set to the measured baseline. Ratchet these up as coverage grows; never down.
thresholds: {
statements: 59.73,
functions: 85.88,
lines: 59.73,
branches: 88.35
}
}
}
});