---
title: "init(description:)"
framework: xctest
role: symbol
role_heading: Initializer
path: "xctest/xctestexpectation/init(description:)"
---

# init(description:)

Creates a new XCTestExpectation with the provided description.

## Declaration

```swift
init(description expectationDescription: String)
```

## Parameters

- `expectationDescription`: A string to display in the test log for this expectation, to help diagnose failures.

## Discussion

Discussion To fulfill an expectation that was created with this initializer, call the expectation’s fulfill() method when the asynchronous task in your test has completed.

## See Also

### Creating Expectations

- [expectationDescription](xctest/xctestexpectation/expectationdescription.md)
