refactor(tools): return complete analysis results inline

This commit is contained in:
morluto
2026-09-29 14:53:50 +08:00
parent c34efca4cd
commit 2a6eb41147
156 changed files with 2529 additions and 1891 deletions
+21
View File
@@ -136,4 +136,25 @@ describe("bytecode provider", () => {
const parsed = bytecodeAnalysisSchema.safeParse(result);
expect(parsed.success).toBe(true);
});
it("returns every artifact when the inventory exceeds ten thousand entries", () => {
const artifacts = Array.from({ length: 10_001 }, (_, index) => ({
path: `classes/${index}.class`,
family: "jvm" as const,
format: "class" as const,
size: 1,
digest: "a".repeat(64),
symbols: [],
is_standard_library: false,
is_generated: false,
is_vendored: false,
}));
const result = analyzeBytecodeArtifacts(artifacts, "jvm");
expect(result.artifacts).toHaveLength(artifacts.length);
expect(bytecodeAnalysisSchema.parse(result).artifacts).toHaveLength(
artifacts.length,
);
});
});