Skip to content

Commit ced6261

Browse files
committed
[CodeFactor] Apply fixes to commit a23d93f
1 parent a23d93f commit ced6261

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

Tests/MistKitTests/Client/MistKitClientTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@
2828
//
2929

3030
import Foundation
31-
import Testing
3231
@testable import MistKit
32+
import Testing
3333

3434
@Suite("MistKitClient Tests")
3535
struct MistKitClientTests {
36-
3736
// MARK: - Configuration-Based Initialization Tests
3837

3938
@Test("MistKitClient initializes with valid configuration and transport")

Tests/MistKitTests/Middleware/LoggingMiddlewareTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@
2929

3030
import Foundation
3131
import HTTPTypes
32+
@testable import MistKit
3233
import OpenAPIRuntime
3334
import Testing
34-
@testable import MistKit
3535

3636
@Suite("LoggingMiddleware Tests")
3737
struct LoggingMiddlewareTests {
38-
3938
// MARK: - Basic Middleware Tests
4039

4140
@Test("LoggingMiddleware intercepts and passes through requests")

Tests/MistKitTests/Utilities/ArrayChunkedTests.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@
2828
//
2929

3030
import Foundation
31-
import Testing
3231
@testable import MistKit
32+
import Testing
3333

3434
@Suite("Array Chunked Tests")
3535
struct ArrayChunkedTests {
36-
3736
@Test("chunked splits array into correct chunks")
3837
func chunkedSplitsCorrectly() {
3938
let array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
@@ -159,27 +158,27 @@ struct ArrayChunkedTests {
159158

160159
@Test("chunked large array performance")
161160
func chunkedLargeArray() {
162-
let array = Array(1...10000)
161+
let array = Array(1...10_000)
163162
let chunks = array.chunked(into: 200)
164163

165164
#expect(chunks.count == 50)
166165
#expect(chunks.allSatisfy { $0.count <= 200 })
167166

168167
let totalElements = chunks.flatMap { $0 }.count
169-
#expect(totalElements == 10000)
168+
#expect(totalElements == 10_000)
170169
}
171170

172171
@Test("chunked with various CloudKit batch sizes", arguments: [50, 100, 150, 200, 250])
173172
func chunkedVariousBatchSizes(batchSize: Int) {
174-
let array = Array(1...1000)
173+
let array = Array(1...1_000)
175174
let chunks = array.chunked(into: batchSize)
176175

177176
// Verify no chunk exceeds batch size
178177
#expect(chunks.allSatisfy { $0.count <= batchSize })
179178

180179
// Verify we didn't lose any elements
181180
let totalElements = chunks.flatMap { $0 }.count
182-
#expect(totalElements == 1000)
181+
#expect(totalElements == 1_000)
183182

184183
// Verify all chunks except last are full
185184
for (index, chunk) in chunks.enumerated() {

Tests/MistKitTests/Utilities/RegexPatternsTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@
2828
//
2929

3030
import Foundation
31-
import Testing
3231
@testable import MistKit
32+
import Testing
3333

3434
@Suite("NSRegularExpression CommonPatterns Tests")
3535
struct RegexPatternsTests {
36-
3736
// MARK: - API Token Validation Tests
3837

3938
@Test("API token regex validates correct 64-character hex strings")

0 commit comments

Comments
 (0)