disabled(_:sourceLocation:_:)
Constructs a condition trait that disables a test if its value is true.
Declaration
static func disabled(_ comment: Comment? = nil, sourceLocation: SourceLocation = #_sourceLocation, _ condition: @escaping @Sendable () async throws -> Bool) -> SelfParameters
- comment:
An optional comment that describes this trait.
- sourceLocation:
The source location of the trait.
- condition:
A closure that contains the trait’s custom condition logic. If this closure returns
false, the trait allows the test to run. Otherwise, the testing library skips the test.
Return Value
An instance of ConditionTrait that evaluates the specified closure.