dotwee_obsidian-raindropio-.../jest.config.cjs
Lukas Wolfsteiner c22dc1f969 build: modernize TypeScript and esbuild configuration
Set compile and bundle target to ES2021 since Obsidian runs on modern Electron.
Replace individual strict flags with strict: true and add noFallthroughCasesInSwitch, skipLibCheck and forceConsistentCasingInFileNames.
Switch module resolution to bundler, removing the need for deprecation workarounds on TypeScript 6.
Drop baseUrl, allowJs and importHelpers; tests now import sources via relative paths.
Aligns the project with the modernized obsidian-sample-plugin configuration.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 11:20:56 +02:00

7 lines
151 B
JavaScript

module.exports = {
preset: "ts-jest",
testEnvironment: "jsdom",
moduleNameMapper: {
"^obsidian$": "<rootDir>/tests/__mocks__/obsidian.ts",
},
};