Skip to content

Commit

Permalink
remove force try
Browse files Browse the repository at this point in the history
  • Loading branch information
GErP83 committed Nov 5, 2024
1 parent 6de3d18 commit 285bfbc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Sources/TestifySDK/Models/TestSuite.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
extension TestSuite {
public static func parse(_ input: String) -> TestSuite? {
let decoder = RawTestResultDecoder()
let suite = try! decoder.decode(input)
let suite = try? decoder.decode(input)
return suite
}
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/testify/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ case .json:

case .junit:
let encoder = TestResultJunitEncoder()
let junitData = try! encoder.encode(suite)
let junitData = try encoder.encode(suite)
print(junitData)

case .md:
let encoder = TestResultMarkdownEncoder()
let mdData = try! encoder.encode(suite)
let mdData = try encoder.encode(suite)
print(mdData)

case .gfm:
let encoder = TestResultGitHubFlavoredMarkdownEncoder()
let mdData = try! encoder.encode(suite)
let mdData = try encoder.encode(suite)
print(mdData)
}

0 comments on commit 285bfbc

Please sign in to comment.