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
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:
(one file per supported language)
Add integration tests in tests/extract_test.rs that:
Keep fixtures minimal — 10-20 lines each, just enough to exercise all extraction features