Skip to content

Add test fixtures and unit tests for each language extractor #6

Description

@DhanushNehru

The extraction engine currently has no test fixtures. Add small sample files for each supported language and verify that extraction produces the expected nodes and edges.

What needs to change:

Create a tests/fixtures/ directory with sample files:

  • tests/fixtures/sample.py — a Python file with a class, function, import, and function call
  • tests/fixtures/sample.js — same for JavaScript
  • tests/fixtures/sample.rs — same for Rust
    (one file per supported language)

Add integration tests in tests/extract_test.rs that:

  • Parse each fixture file using extract_file()
  • Assert the correct number of nodes and edges are extracted
  • Assert specific node kinds (e.g., the Python file should have a NodeKind::Class and a NodeKind::Function)
  • Assert import edges point to the correct target

Keep fixtures minimal — 10-20 lines each, just enough to exercise all extraction features

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions