You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The behaviour can also be reproduced in different Spezi Swift Packages, including the diff code coverage in StanfordSpezi/SpeziAccount#6.
Expected behavior
The preview provides (or even the new #Preview macro) should be excluded from the code coverage report based on the TEST active compilation condition. The TEST active compilation condition should be propagated in the compilation for tests, and the DEBUG flag should ensure that the preview provider is built when showing a view in the Xcode preview.
Code of Conduct
I agree to follow this project's Code of Conduct and Contributing Guidelines
The text was updated successfully, but these errors were encountered:
Description
Xcode previews are currently reported as uncovered code in the code coverage report.
Reproduction
Adding a SwiftUI preview (even with the
DEBUG
#if
statement) is still reported in the code coverage, e.g.:The behaviour can also be reproduced in different Spezi Swift Packages, including the diff code coverage in StanfordSpezi/SpeziAccount#6.
Expected behavior
The preview provides (or even the new
#Preview
macro) should be excluded from the code coverage report based on theTEST
active compilation condition. TheTEST
active compilation condition should be propagated in the compilation for tests, and theDEBUG
flag should ensure that the preview provider is built when showing a view in the Xcode preview.Code of Conduct
The text was updated successfully, but these errors were encountered: