test: reuse application analysis across comparison directions
Reuse immutable source graphs for both export comparison orientations and obtain rest-argument seeds from the existing public CLI Evidence. Retain all direction-specific assertions while removing nine repeated application analyses. Validation: 75 focused tests; covered locations and hit status unchanged across all 1137 source files in controlled before/after coverage runs. Comparison file execution fell from 19.2s to 15.3s locally. Static and generated-document checks passed.
This commit is contained in:
@@ -694,11 +694,9 @@ describe("rest parameter semantic trace CLI", () => {
|
||||
root,
|
||||
"--json",
|
||||
]);
|
||||
const analyzed = await analyzeJavaScriptApplication({ input_path: root });
|
||||
if (!analyzed.ok) throw analyzed.error;
|
||||
const graph = javascriptApplicationAnalysisResultSchema.parse(
|
||||
analyzed.value.normalized_result,
|
||||
).semantic_graph;
|
||||
const graph = z
|
||||
.object({ normalized_result: javascriptApplicationAnalysisResultSchema })
|
||||
.parse(application).normalized_result.semantic_graph;
|
||||
for (const index of [1, 2]) {
|
||||
const argument = graph.nodes.find(
|
||||
({ kind, label }) =>
|
||||
|
||||
Reference in New Issue
Block a user