Skip to content

Commit 5b740f3

Browse files
committed
format
1 parent 646be7d commit 5b740f3

33 files changed

+234
-82
lines changed

Tests/AuthTests/AuthClientMultipleInstancesTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
// Created by Guilherme Souza on 05/07/24.
66
//
77

8-
@testable import Auth
98
import TestHelpers
109
import XCTest
1110

11+
@testable import Auth
12+
1213
final class AuthClientMultipleInstancesTests: XCTestCase {
1314
func testMultipleAuthClientInstances() {
1415
let url = URL(string: "http://localhost:54321/auth")!

Tests/AuthTests/AuthClientTests.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
// Created by Guilherme Souza on 23/10/23.
66
//
77

8-
@testable import Auth
98
import ConcurrencyExtras
109
import CustomDump
11-
@testable import Helpers
1210
import HTTPTypes
1311
import InlineSnapshotTesting
1412
import TestHelpers
1513
import XCTest
1614

15+
@testable import Auth
16+
@testable import Helpers
17+
1718
#if canImport(FoundationNetworking)
1819
import FoundationNetworking
1920
#endif

Tests/AuthTests/AuthErrorTests.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
// Created by Guilherme Souza on 29/08/24.
66
//
77

8-
@testable import Auth
98
import HTTPTypes
109
import XCTest
1110

11+
@testable import Auth
12+
1213
#if canImport(FoundationNetworking)
1314
import FoundationNetworking
1415
#endif
@@ -32,7 +33,11 @@ final class AuthErrorTests: XCTestCase {
3233
XCTAssertEqual(api.errorCode, .emailConflictIdentityNotDeletable)
3334
XCTAssertEqual(api.message, "API Error")
3435

35-
let pkceGrantCodeExchange = AuthError.pkceGrantCodeExchange(message: "PKCE failure", error: nil, code: nil)
36+
let pkceGrantCodeExchange = AuthError.pkceGrantCodeExchange(
37+
message: "PKCE failure",
38+
error: nil,
39+
code: nil
40+
)
3641
XCTAssertEqual(pkceGrantCodeExchange.errorCode, .unknown)
3742
XCTAssertEqual(pkceGrantCodeExchange.message, "PKCE failure")
3843

Tests/AuthTests/ExtractParamsTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
// Created by Guilherme Souza on 23/12/23.
66
//
77

8-
@testable import Auth
98
import XCTest
109

10+
@testable import Auth
11+
1112
final class ExtractParamsTests: XCTestCase {
1213
func testExtractParamsInQuery() {
1314
let code = UUID().uuidString

Tests/AuthTests/RequestsTests.swift

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
// Created by Guilherme Souza on 07/10/23.
66
//
77

8-
@testable import Auth
9-
import Helpers
108
import HTTPTypes
9+
import Helpers
1110
import InlineSnapshotTesting
1211
import SnapshotTesting
1312
import TestHelpers
1413
import XCTest
1514

15+
@testable import Auth
16+
1617
#if canImport(FoundationNetworking)
1718
import FoundationNetworking
1819
#endif
@@ -431,7 +432,12 @@ final class RequestsTests: XCTestCase {
431432
try Dependencies[sut.clientID].sessionStorage.store(.validSession)
432433

433434
await assert {
434-
_ = try await sut.mfa.enroll(params: MFAEnrollParams(issuer: "supabase.com", friendlyName: "test"))
435+
_ = try await sut.mfa.enroll(
436+
params: MFAEnrollParams(
437+
issuer: "supabase.com",
438+
friendlyName: "test"
439+
)
440+
)
435441
}
436442
}
437443

@@ -481,7 +487,13 @@ final class RequestsTests: XCTestCase {
481487
try Dependencies[sut.clientID].sessionStorage.store(.validSession)
482488

483489
await assert {
484-
_ = try await sut.mfa.verify(params: .init(factorId: "123", challengeId: "123", code: "123456"))
490+
_ = try await sut.mfa.verify(
491+
params: .init(
492+
factorId: "123",
493+
challengeId: "123",
494+
code: "123456"
495+
)
496+
)
485497
}
486498
}
487499

Tests/AuthTests/SessionManagerTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// Created by Guilherme Souza on 23/10/23.
66
//
77

8-
@testable import Auth
98
import ConcurrencyExtras
109
import CustomDump
1110
import Helpers
@@ -14,6 +13,8 @@ import TestHelpers
1413
import XCTest
1514
import XCTestDynamicOverlay
1615

16+
@testable import Auth
17+
1718
final class SessionManagerTests: XCTestCase {
1819
var http: HTTPClientMock!
1920

Tests/AuthTests/StoredSessionTests.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
@testable import Auth
21
import ConcurrencyExtras
32
import SnapshotTesting
43
import TestHelpers
54
import XCTest
65

6+
@testable import Auth
7+
78
final class StoredSessionTests: XCTestCase {
89
let clientID = AuthClientID()
910

@@ -37,11 +38,11 @@ final class StoredSessionTests: XCTestCase {
3738
appMetadata: [
3839
"provider": "email",
3940
"providers": [
40-
"email",
41+
"email"
4142
],
4243
],
4344
userMetadata: [
44-
"referrer_id": nil,
45+
"referrer_id": nil
4546
],
4647
aud: "authenticated",
4748
confirmationSentAt: ISO8601DateFormatter().date(from: "2022-04-09T11:57:01Z")!,
@@ -65,13 +66,13 @@ final class StoredSessionTests: XCTestCase {
6566
identityId: UUID(uuidString: "859F402D-B3DE-4105-A1B9-932836D9193B")!,
6667
userId: UUID(uuidString: "859F402D-B3DE-4105-A1B9-932836D9193B")!,
6768
identityData: [
68-
"sub": "859f402d-b3de-4105-a1b9-932836d9193b",
69+
"sub": "859f402d-b3de-4105-a1b9-932836d9193b"
6970
],
7071
provider: "email",
7172
createdAt: ISO8601DateFormatter().date(from: "2022-04-09T11:57:01Z")!,
7273
lastSignInAt: ISO8601DateFormatter().date(from: "2022-04-09T11:57:01Z")!,
7374
updatedAt: ISO8601DateFormatter().date(from: "2022-04-09T11:57:01Z")!
74-
),
75+
)
7576
],
7677
factors: nil
7778
)

Tests/FunctionsTests/FunctionsClientTests.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import ConcurrencyExtras
2-
@testable import Functions
3-
import Helpers
42
import HTTPTypes
3+
import Helpers
54
import TestHelpers
65
import XCTest
76

7+
@testable import Functions
8+
89
#if canImport(FoundationNetworking)
910
import FoundationNetworking
1011
#endif
@@ -57,7 +58,10 @@ final class FunctionsClientTests: XCTestCase {
5758
XCTAssertEqual(request.request.method, .post)
5859
XCTAssertEqual(request.request.headerFields[.init("Apikey")!], apiKey)
5960
XCTAssertEqual(request.request.headerFields[.init("X-Custom-Key")!], "value")
60-
XCTAssertEqual(request.request.headerFields[.init("X-Client-Info")!], "functions-swift/\(Functions.version)")
61+
XCTAssertEqual(
62+
request.request.headerFields[.init("X-Client-Info")!],
63+
"functions-swift/\(Functions.version)"
64+
)
6165
}
6266

6367
func testInvokeWithCustomMethod() async throws {

Tests/FunctionsTests/RequestTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
// Created by Guilherme Souza on 23/04/24.
66
//
77

8-
@testable import Functions
98
import SnapshotTesting
109
import XCTest
1110

11+
@testable import Functions
12+
1213
#if canImport(FoundationNetworking)
1314
import FoundationNetworking
1415
#endif

Tests/HelpersTests/AnyJSONTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77

88
import CustomDump
99
import Foundation
10-
@testable import Helpers
1110
import XCTest
1211

12+
@testable import Helpers
13+
1314
final class AnyJSONTests: XCTestCase {
1415
let jsonString = """
1516
{

0 commit comments

Comments
 (0)