Contents

IssueHandlingTrait

A type that allows transforming or filtering the issues recorded by a test.

Declaration

struct IssueHandlingTrait

Overview

Use this type to observe or customize the issue(s) recorded by the test this trait is applied to. You can transform a recorded issue by copying it, modifying one or more of its properties, and returning the copy. You can observe recorded issues by returning them unmodified. Or you can suppress an issue by either filtering it using filterIssues(_:) or returning nil from the closure passed to compactMapIssues(_:).

When an instance of this trait is applied to a suite, it is recursively inherited by all child suites and tests.

To add this trait to a test, use one of the following functions:

Topics

Instance Methods

See Also

Supporting types