Skip to content

Commit de5d5e5

Browse files
committed
Tests: avoid abnormal exit on failure
Rather than using the forced unwrap, use `XCTUnwrap` to allow the test suite to continue in the case of a failure.
1 parent 4316b85 commit de5d5e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/WorkspaceTests/WorkspaceTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5017,7 +5017,7 @@ final class WorkspaceTests: XCTestCase {
50175017
do {
50185018
let ws = try workspace.getOrCreateWorkspace()
50195019
let pinsStore = try ws.pinsStore.load()
5020-
let fooPin = pinsStore.pins.values.first(where: { $0.packageRef.identity.description == "foo" })!
5020+
let fooPin = try XCTUnwrap(pinsStore.pins.values.first(where: { $0.packageRef.identity.description == "foo" }))
50215021

50225022
let fooRepo = workspace.repositoryProvider
50235023
.specifierMap[RepositorySpecifier(path: try AbsolutePath(

0 commit comments

Comments
 (0)