Shared vitest configuration for Obsidian plugins.
Every plugin in the workspace declares the same five vitest projects — unit-tests plus the integration-tests:{no-app,desktop,desktop-performance,android} family — with the same timeouts, setupFiles, and globalSetup wiring. Maintaining that per repo means a convention change costs one near-identical edit per plugin, and any repo that is missed drifts silently. This module owns that configuration once, so a plugin’s scripts/vitest-config.ts collapses to a single call.
The seam mirrors the ESLint one (defineEslintConfigs): the factory builds a context holding the standard projects, the caller edits it in place through DefineObsidianPluginVitestConfigOptions.editContext, and appends any project the base does not know about through DefineObsidianPluginVitestConfigOptions.customProjects.
| Variable |
Description |
| INTEGRATION_TEST_TIMEOUT_IN_MILLISECONDS |
The per-test budget of the regular integration projects, in milliseconds. Exported because a repo that assembles its vitest projects by hand instead of through defineObsidianPluginVitestConfig still needs the same relationship to the per-eval cap, and restating the number there is how the two drift apart. |