Skip to content

Commit dd8cd04

Browse files
authored
Merge pull request #164 from thedavidharris/main
Update for Swift 5.8 support
2 parents 92ece74 + 4e1147c commit dd8cd04

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Sources/PulseUI/Features/Inspector/NetworkInspectorView-shared.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ extension NetworkInspectorView {
3737
NetworkInspectorTransferInfoView(viewModel: .init(task: task))
3838
} else if task.state == .pending {
3939
SpinnerView(viewModel: ProgressViewModel(task: task))
40-
} else if let status = NetworkRequestStatusSectionViewModel(task: task).status {
40+
} else {
4141
// Fallback in case metrics are disabled
42+
let status = NetworkRequestStatusSectionViewModel(task: task).status
4243
Image(systemName: status.imageName)
4344
.foregroundColor(status.tintColor)
4445
.font(.system(size: 64))

Tests/PulseUITests/ConsoleTextViewModelTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ final class ConsoleTextViewModelTests: ConsoleTestCase {
4545
reset()
4646

4747
// THEN
48-
XCTAssertNotNil(string.wholeMatch(of: /(.*?) · Test-Label · test-text\n/), string)
48+
XCTAssertNotNil(string.wholeMatch(of: #/(.*?) · Test-Label · test-text\n/#), string)
4949
}
5050

5151
func testInsertedMessageRendered() {
@@ -57,7 +57,7 @@ final class ConsoleTextViewModelTests: ConsoleTestCase {
5757

5858
// THEN
5959
wait(for: [expectation], timeout: 2)
60-
XCTAssertNotNil(string.wholeMatch(of: /(.*?) · Test-Label · test-text\n/), string)
60+
XCTAssertNotNil(string.wholeMatch(of: #/(.*?) · Test-Label · test-text\n/#), string)
6161
}
6262

6363
func testInsertedPendingTaskRendered() {
@@ -75,7 +75,7 @@ final class ConsoleTextViewModelTests: ConsoleTestCase {
7575

7676
// THEN
7777
wait(for: [textInsertedExpectation], timeout: 2)
78-
XCTAssertNotNil(string.wholeMatch(of: /(.*?) · Pending · GET https:\/\/example.com\/api\n/), string)
78+
XCTAssertNotNil(string.wholeMatch(of: #/(.*?) · Pending · GET https:\/\/example.com\/api\n/#), string)
7979

8080
// GIVEN
8181
let textUpdatedEpectation = self.expectation(description: "textUpdatedxpectation")
@@ -87,7 +87,7 @@ final class ConsoleTextViewModelTests: ConsoleTestCase {
8787

8888
// THEN
8989
wait(for: [textUpdatedEpectation], timeout: 2)
90-
XCTAssertNotNil(string.wholeMatch(of: /(.*?) · 200 OK · GET https:\/\/example.com\/api\n/), string)
90+
XCTAssertNotNil(string.wholeMatch(of: #/(.*?) · 200 OK · GET https:\/\/example.com\/api\n/#), string)
9191
}
9292

9393
func testDetailsShown() throws {

0 commit comments

Comments
 (0)