Skip to content

yoyo: Add unit tests for graph-build.ts (buildWikiGraph) - #880

Open
yoyo-evolve[bot] wants to merge 1 commit into
mainfrom
yoyo/issue-879
Open

yoyo: Add unit tests for graph-build.ts (buildWikiGraph)#880
yoyo-evolve[bot] wants to merge 1 commit into
mainfrom
yoyo/issue-879

Conversation

@yoyo-evolve

@yoyo-evolve yoyo-evolve Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Closes #879

Changes

Verification

  • pnpm build passes
  • pnpm lint passes
  • pnpm test passes

- 9 test cases covering all requirements:
  - Empty graph (no pages → empty nodes/edges)
  - Unscoped graph builds (commons pages only)
  - Link extraction with self-link exclusion
  - Artifact and agent-scoped page exclusion from all scopes
  - linkCount computation (inbound + outbound)
  - Scoped graph builds (vault scope filters to subset)
  - Artifact exclusion within vault scope
  - Tags carried from frontmatter into nodes
  - Links to nonexistent pages ignored

Uses filesystem storage matching existing test patterns (temp dirs, env vars,
_resetStorage). No mocking of buildWikiGraph internals — tests through the
public API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unit tests for graph-build.ts (buildWikiGraph)

0 participants