test: remove duplicate result assertions before throwing guards
This commit is contained in:
@@ -61,7 +61,6 @@ async function createCompleteAppleProjection() {
|
||||
inventory_evidence: fragments,
|
||||
});
|
||||
|
||||
expect(result.ok).toBe(true);
|
||||
if (!result.ok) throw new TypeError("Could not project fixture inventory");
|
||||
const projection = appleApplicationProjectionResultSchema.parse(
|
||||
result.value.normalized_result,
|
||||
|
||||
@@ -200,7 +200,6 @@ describe("managed application graph coverage", () => {
|
||||
managed_members: parserPartialEvidence,
|
||||
});
|
||||
|
||||
expect(parserPartialProjection.ok).toBe(true);
|
||||
if (!parserPartialProjection.ok)
|
||||
throw new Error("partial projection failed");
|
||||
const parserPartialResult = managedApplicationGraphResultSchema.parse(
|
||||
|
||||
@@ -43,7 +43,6 @@ describe("IDA provider composition", () => {
|
||||
diagnostics: { live_connection_probed: false },
|
||||
});
|
||||
const resolution = await provider.resolveAnalysisProfile(target);
|
||||
expect(resolution.ok).toBe(true);
|
||||
if (!resolution.ok) throw resolution.error;
|
||||
expect(resolution.value.profile.parameters).toMatchObject({
|
||||
engine_version: null,
|
||||
@@ -75,7 +74,6 @@ describe("IDA provider composition", () => {
|
||||
const first = await session.execute("procedure_pseudo_code", query);
|
||||
expect(first.ok && first.value.result).toContain("42");
|
||||
const snapshot = session.exportAnalysisSnapshot();
|
||||
expect(snapshot.ok).toBe(true);
|
||||
if (!snapshot.ok) throw snapshot.error;
|
||||
expect(snapshot.value.entries).toEqual([]);
|
||||
const profile = session.analysisProfile();
|
||||
|
||||
Reference in New Issue
Block a user