Skip to content

bug(citation-manager): CLI integration test paths break in monorepo root after worktree merge #2

@WesleyMFrederick

Description

@WesleyMFrederick

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.jscitation-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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions