---
title: expectation
framework: testing
role: symbol
role_heading: Instance Property
path: testing/expectationfailederror/expectation
---

# expectation

The expectation that failed.

## Declaration

```swift
var expectation: Expectation
```
