MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / test_js_adr_reference_extracted

Function test_js_adr_reference_extracted

tests/test_rationale.py:299–310  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

297
298
299def test_js_adr_reference_extracted(tmp_path):
300 from graphify.extract import extract_js
301 path = _write_ts(tmp_path, '''
302 // Gateway pattern per ADR-0002; provider selection per ADR-0015.
303 export function route(): void {}
304 ''')
305 result = extract_js(path)
306 refs = [n for n in result["nodes"] if n.get("file_type") == "doc_ref"]
307 labels = {n["label"] for n in refs}
308 assert "ADR-0002" in labels and "ADR-0015" in labels
309 cites = [e for e in result["edges"] if e.get("relation") == "cites"]
310 assert len(cites) == 2
311
312
313def test_js_adr_reference_normalized_and_deduped(tmp_path):

Callers

nothing calls this directly

Calls 3

extract_jsFunction · 0.90
_write_tsFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected