---
title: expectedValue
framework: xctest
role: symbol
role_heading: Instance Property
path: xctest/xctkeypathexpectation/expectedvalue
---

# expectedValue

A value that the key path’s specified property must equal to fulfill the expectation.

## Declaration

```swift
final var expectedValue: V? { get }
```

## Discussion

Discussion If the expectation doesn’t initialize with an expected value, this property returns nil.

## See Also

### Expectation properties

- [keyPath](xctest/xctkeypathexpectation/keypath.md)
- [observedObject](xctest/xctkeypathexpectation/observedobject.md)
- [options](xctest/xctkeypathexpectation/options.md)
