Skip to content

Commit 4e5784c

Browse files
committed
Convert XCTAsserEqualAsync
1 parent 8b8946d commit 4e5784c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Tests/AppTests/IngestionTests.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ import Vapor
114114

115115
// validate
116116
do {
117-
try await XCTAssertEqualAsync(try await Repository.query(on: app.db).count(), 1)
117+
#expect(try await Repository.query(on: app.db).count() == 1)
118118
let repo = try await Repository.query(on: app.db).first().unwrap()
119119
#expect(repo.summary == "This is package foo/bar")
120120
}
@@ -176,7 +176,7 @@ import Vapor
176176

177177
// validate
178178
do {
179-
try await XCTAssertEqualAsync(try await Repository.query(on: app.db).count(), 1)
179+
#expect(try await Repository.query(on: app.db).count() == 1)
180180
let repo = try await Repository.query(on: app.db).first().unwrap()
181181
#expect(repo.defaultBranch == "main")
182182
#expect(repo.forks == 1)
@@ -463,8 +463,8 @@ import Vapor
463463
} operation: { [db = app.db] in
464464
try await Analyze.analyze(client: app.client, database: db, mode: .id(.id0))
465465
try await Analyze.analyze(client: app.client, database: db, mode: .id(.id1))
466-
try await XCTAssertEqualAsync(try await Package.find(.id0, on: db)?.processingStage, .analysis)
467-
try await XCTAssertEqualAsync(try await Package.find(.id1, on: db)?.processingStage, .analysis)
466+
#expect(try await Package.find(.id0, on: db)?.processingStage == .analysis)
467+
#expect(try await Package.find(.id1, on: db)?.processingStage == .analysis)
468468
}
469469
}
470470
}
@@ -521,7 +521,7 @@ import Vapor
521521
try await Ingestion.ingest(client: app.client, database: app.db, mode: .limit(1))
522522

523523
// validate
524-
try await XCTAssertEqualAsync(await Repository.query(on: app.db).count(), 1)
524+
#expect(try await Repository.query(on: app.db).count() == 1)
525525
let repo = try await XCTUnwrapAsync(await Repository.query(on: app.db).first())
526526
// Ensure fetch and store have been called, etag save to repository
527527
#expect(fetchCalls.value == 1)
@@ -537,7 +537,7 @@ import Vapor
537537
try await Ingestion.ingest(client: app.client, database: app.db, mode: .limit(1))
538538

539539
// validate
540-
try await XCTAssertEqualAsync(await Repository.query(on: app.db).count(), 1)
540+
#expect(try await Repository.query(on: app.db).count() == 1)
541541
let repo = try await XCTUnwrapAsync(await Repository.query(on: app.db).first())
542542
// Ensure fetch and store have been called, etag save to repository
543543
#expect(fetchCalls.value == 2)
@@ -553,7 +553,7 @@ import Vapor
553553
try await Ingestion.ingest(client: app.client, database: app.db, mode: .limit(1))
554554

555555
// validate
556-
try await XCTAssertEqualAsync(await Repository.query(on: app.db).count(), 1)
556+
#expect(try await Repository.query(on: app.db).count() == 1)
557557
let repo = try await XCTUnwrapAsync(await Repository.query(on: app.db).first())
558558
// Ensure fetch and store have been called, etag save to repository
559559
#expect(fetchCalls.value == 3)
@@ -640,7 +640,7 @@ import Vapor
640640
}
641641

642642
// validate
643-
try await XCTAssertEqualAsync(await Repository.query(on: app.db).count(), 1)
643+
#expect(try await Repository.query(on: app.db).count() == 1)
644644
let repo = try await XCTUnwrapAsync(await Repository.query(on: app.db).first())
645645
#expect(storeCalls.value == 1)
646646
// Ensure an error is recorded

0 commit comments

Comments
 (0)