jsmorabito_obsidian-commander/vitest.config.ts
johnny1093 b3af074174 test: add vitest suite for macros, icons, modes, styles, and locales
Adds coverage for executeMacro, injectIcons, isModeActive, updateStyles/
removeStyles, and locale completeness, plus the Obsidian API mocks and
setup needed to run them under jsdom. Updates a stale fr.json key to
match the current English source string.
2026-07-11 09:13:56 -04:00

26 lines
537 B
TypeScript

import { defineConfig } from "vitest/config";
import path from "path";
export default defineConfig({
test: {
environment: "jsdom",
globals: false,
setupFiles: ["src/__tests__/setup.ts"],
},
resolve: {
alias: [
{
find: "obsidian",
replacement: path.resolve(__dirname, "src/__tests__/__mocks__/obsidian.ts"),
},
{
find: /.*\/l10n$/,
replacement: path.resolve(__dirname, "src/__tests__/__mocks__/l10n.ts"),
},
{
find: "src",
replacement: path.resolve(__dirname, "src"),
},
],
},
});