SPM Prep - Use XCTUnwrap instead of force-unwrapping for fixture paths in tests #756
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This will make it easier to run the tests once the fixture files move around.
If a file is misplaced, the test will fail instead of crashing.
Operationally, failing is better than crashing because it generates a
list of all misplaced tests, so that they can be addressed in one go. The alternative would be a run tests, tests crash, fix individual file path loop for as many misplaced fixture files there are.
Unfortunately, the diff is extensive. However, with the exception of
RemoteTestCase.swift
which changed in isolation in 007e11a, the pattern for all the changes is the same:From:
To:
Testing Details
Green CI. This is only a unit tests implementation change.
Next up
Basically, cherry-pick the work from #738 but in a neat and reviewable order:
Sources/
andTests/
Bundle
helper that differentiates between SPM and CocoaPods installationsCHANGELOG.md
if necessary. — N.A.