Skip to content

test: add integration test for parseProject using ecommerce fixture #3

@TechPMRyan

Description

@TechPMRyan

Summary

parseProject in src/parser/index.ts — the orchestration function that walks a directory, calls all four extractors, and returns the assembled node list — has no dedicated test file. It is the seam between the parser layer and the graph builder, and the most likely place for integration bugs to hide.

The tests/parser/fixtures/ecommerce-app fixture (40+ files across 9 modules) was built for this purpose but is not referenced by any test.

What needs to happen

  • Write an integration test for parseProject that points at the ecommerce fixture directory
  • Assert the expected node count (controllers, services, modules, models)
  • Assert the pipeline completes without error
  • Assert a representative set of nodes are present with correct names, kinds, and file paths
  • Feed the result into buildGraph to confirm the full pipeline produces a valid, non-empty graph

Why this matters

Unit tests prove each extractor works in isolation. This test proves the product works end-to-end. Without it, there is no test that covers the path a real user takes: point Tracer at a directory, get a graph out.

Acceptance criteria

  • Integration test runs parseProject against tests/parser/fixtures/ecommerce-app
  • Asserts correct node count per kind (controllers, services, modules, models)
  • Asserts specific known nodes are present (e.g. OrderService, AuthController)
  • buildGraph called on the result — asserts non-empty graph with edges
  • Test fails loudly if the pipeline drops nodes silently

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions