mirror of
https://github.com/taskgenius/taskgenius-plugin.git
synced 2026-07-22 06:40:25 +00:00
Phase 0 W0 of the v10 refactor: introduce a buildOrchestrator() helper that boots a real DataflowOrchestrator with mock App/Vault/ MetadataCache, plus an InMemoryStorage double and a localforage jest mock so the cache layer can construct under jsdom. This is the foundation that subsequent stability work (lifecycle hazard fix, worker timeout, cache invariants, migration tombstones, critical-path integration tests) depends on. Smoke tests verify fixture construction, vault event plumbing, and clean dispose. 12/12 smoke tests pass; existing suite unchanged.
31 lines
1.1 KiB
JavaScript
31 lines
1.1 KiB
JavaScript
module.exports = {
|
|
preset: "ts-jest",
|
|
testEnvironment: "jsdom",
|
|
testMatch: ["**/__tests__/**/*.test.ts"],
|
|
testPathIgnorePatterns: ["<rootDir>/.conductor/"],
|
|
modulePathIgnorePatterns: ["<rootDir>/.conductor/"],
|
|
moduleNameMapper: {
|
|
"^obsidian$": "<rootDir>/src/__mocks__/obsidian.ts",
|
|
"^moment$": "<rootDir>/src/__mocks__/moment.js",
|
|
"^localforage$": "<rootDir>/src/__mocks__/localforage.ts",
|
|
"^@codemirror/state$": "<rootDir>/src/__mocks__/codemirror-state.ts",
|
|
"^@codemirror/view$": "<rootDir>/src/__mocks__/codemirror-view.ts",
|
|
"^@codemirror/language$":
|
|
"<rootDir>/src/__mocks__/codemirror-language.ts",
|
|
"^@codemirror/search$": "<rootDir>/src/__mocks__/codemirror-search.ts",
|
|
"^@/.*\\.(css|less|scss|sass)$": "<rootDir>/src/__mocks__/styleMock.js",
|
|
"^@/(.*)$": "<rootDir>/src/$1",
|
|
"\\.(css|less|scss|sass)$": "<rootDir>/src/__mocks__/styleMock.js",
|
|
".*\\.worker$": "<rootDir>/src/__mocks__/ProjectData.worker.ts",
|
|
},
|
|
transform: {
|
|
"^.+\\.tsx?$": [
|
|
"ts-jest",
|
|
{
|
|
tsconfig: "tsconfig.json",
|
|
},
|
|
],
|
|
},
|
|
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
|
|
setupFilesAfterEnv: ["<rootDir>/src/test-setup.ts"],
|
|
};
|