Skip to content

Commit 95fc74e

Browse files
Style checks
1 parent 4d78594 commit 95fc74e

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Tests/Unit/ErrorsTypes.swift

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,19 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
import Foundation
1615
import Combine
16+
import Foundation
1717
import XCTest
1818

1919
import FirebaseCore
2020
@testable import FirebaseDataConnect
2121

2222
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
2323
final class ErrorTypesTests: XCTestCase {
24-
2524
private var pubCancellable: AnyCancellable?
2625
private let errPublisher = PassthroughSubject<Result<String, AnyDataConnectError>, Never>()
2726

28-
func throwInitError() throws {
27+
func throwInitError() throws {
2928
throw DataConnectInitError.appNotConfigured()
3029
}
3130

@@ -38,17 +37,15 @@ final class ErrorTypesTests: XCTestCase {
3837
}
3938

4039
func testPublisherErrorType() throws {
41-
4240
let errExpectation = XCTestExpectation(description: "Expect a Domain Erro")
4341

44-
pubCancellable = errPublisher.sink( receiveValue: { result in
42+
pubCancellable = errPublisher.sink(receiveValue: { result in
4543
switch result {
46-
case .success(_):
44+
case .success:
4745
XCTFail("Unexpectedly got success. We expect a failure with error")
4846
case let .failure(dcerror):
4947
if let initErr = dcerror.dataConnectError as? DataConnectInitError,
50-
initErr.code == .appNotConfigured
51-
{
48+
initErr.code == .appNotConfigured {
5249
// got Init domain error
5350
errExpectation.fulfill()
5451
} else {

0 commit comments

Comments
 (0)