Skip to content

Commit

Permalink
make test non-crashing if assertion fails
Browse files Browse the repository at this point in the history
  • Loading branch information
armcknight committed Aug 25, 2023
1 parent c0f1495 commit 58f4e23
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ class SentryBreadcrumbTrackerTests: XCTestCase {
let crumbs = delegate.addCrumbInvocations.invocations

// one breadcrumb for starting the tracker, and a second one for the swizzled viewDidAppear
XCTAssertEqual(2, crumbs.count)
guard crumbs.count == 2 else {
XCTFail("Expected exactly 2 breadcrumbs")
return
}

let lifeCycleCrumb = crumbs[1]
XCTAssertEqual("navigation", lifeCycleCrumb.type)
Expand Down

0 comments on commit 58f4e23

Please sign in to comment.