mirror of
https://github.com/mnaoumov/obsidian-backlink-full-path.git
synced 2026-07-22 05:41:39 +00:00
- Delete PluginTypes.ts and remove generic from PluginBase - Convert PluginSettingsManager to PluginSettingsComponent with DI params - Use constructor registerComponent() pattern for settings and settings tab - Replace onSaveSettings override with event subscription on settings component - Rename all source files to kebab-case (Plugin.ts -> plugin.ts, etc.) - Add vitest test infrastructure with jsdom environment and obsidian-test-mocks - Add 14 tests covering settings defaults, component creation, and plugin construction - Update tsconfig: remove allowJs, svelte types; add vitest.config.ts to include - Add obsidian-test-mocks, sass-embedded, vitest, jsdom as dev dependencies BREAKING CHANGE: Requires obsidian-dev-utils v2 (component architecture).
30 lines
640 B
TypeScript
30 lines
640 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export const config = defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
obsidian: 'obsidian-test-mocks/obsidian'
|
|
}
|
|
},
|
|
test: {
|
|
coverage: {
|
|
exclude: [
|
|
'src/**/*.test.ts'
|
|
],
|
|
include: ['src/**/*.ts'],
|
|
provider: 'v8',
|
|
reporter: ['text', 'lcov', 'html'],
|
|
reportsDirectory: './coverage'
|
|
},
|
|
environment: 'jsdom',
|
|
globals: false,
|
|
include: ['src/**/*.test.ts'],
|
|
onConsoleLog: (): false => false,
|
|
server: {
|
|
deps: {
|
|
inline: ['obsidian-typings']
|
|
}
|
|
},
|
|
setupFiles: ['obsidian-test-mocks/setup']
|
|
}
|
|
});
|