Summary
4 CLI integration test files reference dist/citation-manager.js from repo root, but the actual build output is at tools/citation-manager/dist/. These tests passed in the worktree context (where dist/ was at root) but fail in the monorepo structure.
Failing Tests (16 failures across 4 files)
extract-command.test.js — 9 failures
extract-header.test.js — 4 failures
extract-links-e2e.test.js — 1 failure
base-paths-npm-script.test.js — path resolution issue
Root Cause
Worktree branch (typescript-refactor-epic6-extraction-layer-worktree) converted citation-manager.js → citation-manager.ts with build output to dist/. Tests used relative dist/citation-manager.js paths that resolved correctly in the worktree's isolated directory but not from monorepo root.
Fix
Update test file execSync calls to use the correct path relative to monorepo root:
- node dist/citation-manager.js
+ node tools/citation-manager/dist/citation-manager.js
Or use path.resolve(__dirname, ...) for robust resolution.
Context
Introduced during merge of Epic 6/7 worktree branch into typescript-refactor. All 338 other tests pass. See commit 268fdf5.
Summary
4 CLI integration test files reference
dist/citation-manager.jsfrom repo root, but the actual build output is attools/citation-manager/dist/. These tests passed in the worktree context (wheredist/was at root) but fail in the monorepo structure.Failing Tests (16 failures across 4 files)
extract-command.test.js— 9 failuresextract-header.test.js— 4 failuresextract-links-e2e.test.js— 1 failurebase-paths-npm-script.test.js— path resolution issueRoot Cause
Worktree branch (
typescript-refactor-epic6-extraction-layer-worktree) convertedcitation-manager.js→citation-manager.tswith build output todist/. Tests used relativedist/citation-manager.jspaths that resolved correctly in the worktree's isolated directory but not from monorepo root.Fix
Update test file
execSynccalls to use the correct path relative to monorepo root:Or use
path.resolve(__dirname, ...)for robust resolution.Context
Introduced during merge of Epic 6/7 worktree branch into
typescript-refactor. All 338 other tests pass. See commit268fdf5.