<!--
{
  "availability" : [
    "iOS: 27.3.0 -",
    "iPadOS: 27.3.0 -",
    "macCatalyst: 27.3.0 -",
    "macOS: 27.3.0 -",
    "tvOS: 27.3.0 -",
    "visionOS: 27.3.0 -",
    "watchOS: 27.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntentsTesting",
  "identifier" : "/documentation/AppIntentsTesting/AppEntityDefinition/expect",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "App Intents Testing",
      "AppIntentsTesting"
    ],
    "preciseIdentifier" : "s:17AppIntentsTesting0A16EntityDefinitionV6expectAA30IntentValueExpectationCallableVyAA0ghI0_pAA0adI0VGvp"
  },
  "title" : "expect"
}
-->

# expect

A callable that creates an entity expectation from value expectations
for the entity’s properties.

```
var expect: IntentValueExpectationCallable<any IntentValueExpectation, AppEntityExpectation> { get }
```

## Discussion

Call `expect` with a labeled argument for each property you want to
check. Each label names a property, and each argument is the value
expectation for it. The expectation doesn’t check properties you omit
or pass `nil` for. Pass [`isNil`](/documentation/AppIntentsTesting/IntentValueExpectation/isNil) to expect a
property to be absent. For example:

```swift
let expectation = eventEntityDefinition.expect(
    title: .contains("NASA"),
    endDate: .isNil
)
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)