Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift Testing #14

Merged
merged 7 commits into from
Oct 12, 2024
Merged

Swift Testing #14

merged 7 commits into from
Oct 12, 2024

Conversation

fpseverino
Copy link
Member

  • Switch from XCTest to Swift Testing

Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.40%. Comparing base (939492b) to head (4708998).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
+ Coverage   96.35%   96.40%   +0.04%     
==========================================
  Files          32       34       +2     
  Lines        1153     1167      +14     
==========================================
+ Hits         1111     1125      +14     
  Misses         42       42              
Files with missing lines Coverage Δ
Sources/Orders/OrdersService.swift 100.00% <ø> (ø)
Sources/PassKit/Testing/SecretMiddleware.swift 100.00% <100.00%> (ø)
Sources/PassKit/Testing/isLoggingConfigured.swift 100.00% <100.00%> (ø)
Sources/Passes/PassesService.swift 100.00% <100.00%> (ø)

.swift-format Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth moving this into a separate module to avoid duplicating?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The withApp functions pass to the closure not only the Application, but also a PassesService or OrdersService (which don't share a common protocol) which are also used to set up model middleware and migrations, so most of the code in these functions can't be unified

Tests/PassesTests/PassesTests.swift Show resolved Hide resolved
Tests/PassesTests/PassesTests.swift Outdated Show resolved Hide resolved
.swift-format Show resolved Hide resolved
Tests/OrdersTests/EncryptedOrdersTests.swift Outdated Show resolved Hide resolved
@fpseverino fpseverino merged commit 349b450 into vapor-community:main Oct 12, 2024
8 of 11 checks passed
@fpseverino fpseverino deleted the testing branch October 12, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants