Skip to content

Dependencies in @Tests are not reset but are in XCTest #333

Answered by mbrandonw
ph1ps asked this question in Q&A
Discussion options

You must be logged in to vote

Edit 1: You will need to Run "TestSuite" repeatedly, to run into this problem

I believe we have documentation on this somewhere, but currently .dependency does not work with parameterized tests or repeatedly run tests. We are currently doing some hacky things to support .dependency in the first place, but really we need new tools from Swift Testing to support this properly. Those tools are coming, hopefully in Swift 6.1, called Test Scoping Traits.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@mbrandonw
Comment options

@ph1ps
Comment options

@Infinity-James
Comment options

Answer selected by ph1ps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants