callumalpass_tasknotes/tsconfig.json
Callum Alpass 1ddb92ee0b fix(tests): Resolve multiple unit and integration test failures
This commit addresses a series of cascading test failures to ensure the entire test suite passes, enhancing codebase stability.

   The primary changes include:

   1.  **Fix `MigrationService` Error Handling:**
       - Refactored `performMigration` to correctly catch and handle promise rejections occurring within the `migrateFile` function.
       - Corrected flawed mocks for `app.fileManager.processFrontMatter` in unit and integration tests to accurately simulate asynchronous error propagation.

   2.  **Resolve `TaskService` Test Failures:**
       - Fixed `task-service-completion.test.ts` by providing a proper mock for `TaskNotesPlugin`, ensuring `getTaskInfo` returns valid recurring task objects.
       - Corrected test logic to pass `TaskInfo` objects instead of raw IDs to service methods, aligning with the required function signatures.
       - Fixed a `ReferenceError` in a test case by using the correct variable.

   3.  **Correct UI and Utility Code:**
       - Replaced the browser `confirm()` dialog in `FilterBar.ts` with the plugin custom `ConfirmationModal` to prevent breaking tests in a non-browser environment.
       - Removed an unnecessary, inferable type declaration in `dateUtils.ts` that was causing a type-checking error.
       - Added `"DOM.Iterable"` to the `lib` array in `tsconfig.json` to resolve a type error during compilation.
2025-07-12 21:22:25 +10:00

31 lines
581 B
JSON

{
"compilerOptions": {
"baseUrl": ".",
"inlineSourceMap": true,
"inlineSources": true,
"module": "ESNext",
"target": "ES6",
"allowJs": true,
"noImplicitAny": true,
"moduleResolution": "node",
"importHelpers": true,
"isolatedModules": true,
"strictNullChecks": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"lib": [
"DOM",
"DOM.Iterable",
"ES5",
"ES6",
"ES7"
]
},
"include": [
"src/**/*.ts"
],
"exclude": [
"tests/**/*",
"node_modules/**/*"
]
}