test: remove duplicate result assertions before throwing guards
This commit is contained in:
@@ -86,7 +86,6 @@ describe("native signature target identity", () => {
|
||||
const result = await new NativeMacOSProvider(runner, "darwin")
|
||||
.createClient(target)
|
||||
.execute("inspect_signature", {});
|
||||
expect(result.ok).toBe(false);
|
||||
if (result.ok) throw new Error("Expected target-change failure");
|
||||
expect(projectAnalysisError(result.error)).toMatchObject({
|
||||
code: "artifact_changed",
|
||||
@@ -113,7 +112,6 @@ describe("native signature target identity", () => {
|
||||
const result = await new NativeMacOSProvider(runner, "darwin")
|
||||
.createClient(target)
|
||||
.execute("inspect_signature", {});
|
||||
expect(result.ok).toBe(false);
|
||||
if (result.ok) throw new Error("Expected target-change failure");
|
||||
expect(projectAnalysisError(result.error)).toMatchObject({
|
||||
code: "artifact_changed",
|
||||
@@ -132,7 +130,6 @@ describe("native signature target identity", () => {
|
||||
const result = await new NativeMacOSProvider(runner, "darwin")
|
||||
.createClient(target)
|
||||
.execute("inspect_signature", {});
|
||||
expect(result.ok).toBe(false);
|
||||
if (result.ok) throw new Error("Expected access denial");
|
||||
expect(projectAnalysisError(result.error)).toMatchObject({
|
||||
code: "access_denied",
|
||||
@@ -156,7 +153,6 @@ describe("native signature target identity", () => {
|
||||
const result = await new NativeMacOSProvider(runner, "darwin")
|
||||
.createClient(target)
|
||||
.execute("inspect_signature", {});
|
||||
expect(result.ok).toBe(false);
|
||||
if (result.ok) throw new Error("Expected access denial");
|
||||
expect(projectAnalysisError(result.error)).toMatchObject({
|
||||
code: "access_denied",
|
||||
|
||||
@@ -70,7 +70,6 @@ it("accepts a byte-order mark before plist JSON", () => {
|
||||
const parsed = parsePlistJson(
|
||||
'\uFEFF{"CFBundleIdentifier":"com.owned.fixture"}',
|
||||
);
|
||||
expect(parsed.ok).toBe(true);
|
||||
if (!parsed.ok) throw new Error("expected plist JSON to parse");
|
||||
expect(parsed.value.bundle.identifier).toBe("com.owned.fixture");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user