feat(javascript): compare source with shipped bundles

This commit is contained in:
morluto
2026-07-24 13:17:19 +00:00
parent 8271650945
commit 697be942e8
19 changed files with 1692 additions and 16 deletions
+13
View File
@@ -12,6 +12,7 @@ import {
JAVASCRIPT_FEATURE_TRACE_FULL_EVIDENCE_EXAMPLE,
JAVASCRIPT_FEATURE_TRACE_EXAMPLE,
JAVASCRIPT_VERSION_COMPARISON_FULL_EVIDENCE_EXAMPLE,
SOURCE_TO_BUNDLE_COMPARISON_EXAMPLE,
} from "../src/contracts/javascriptApplicationWorkflowExamples.js";
import {
createEvidenceBundle,
@@ -65,6 +66,18 @@ describe("application workflow CLI parity", () => {
summary: { unknown: expect.any(Number) },
},
});
const sourceCompared = await runCli([
"compare-source-to-bundle",
JSON.stringify({
reference: SOURCE_TO_BUNDLE_COMPARISON_EXAMPLE.reference,
application: JAVASCRIPT_FEATURE_TRACE_FULL_EVIDENCE_EXAMPLE.application,
}),
"--json",
]);
expect(sourceCompared).toMatchObject({
operation: "compare_source_to_bundle",
normalized_result: { schema_version: 1 },
});
}, 20_000);
it("traces the same authenticated semantic graph through the CLI", async () => {