<!--
{
  "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/AppIntentDefinition/expect",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "App Intents Testing",
      "AppIntentsTesting"
    ],
    "preciseIdentifier" : "s:17AppIntentsTesting0A16IntentDefinitionV6expectAA0D24ValueExpectationCallableVyAA010ResolvabledgH0_pAA0adH0VGvp"
  },
  "title" : "expect"
}
-->

# expect

A callable that creates an intent expectation from value expectations
for the intent’s parameters.

```
var expect: IntentValueExpectationCallable<any ResolvableIntentValueExpectation, AppIntentExpectation> { get }
```

## Discussion

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

```swift
let createEventIntentDefinition = definitions.intents["CreateEventIntent"]
let expectation = createEventIntentDefinition.expect(
    title: .contains("NASA")
)
```

The framework checks each parameter as the caller passed it, before any
entity query runs. An entity parameter accepts an entity definition or
an [`AppEntityIdentifierExpectation`](/documentation/AppIntentsTesting/AppEntityIdentifierExpectation), but not an
[`AppEntityExpectation`](/documentation/AppIntentsTesting/AppEntityExpectation).

The framework matches labels to parameter names when it evaluates the
expectation, not when your code compiles, so a misspelled label reads
as a missing parameter.

---

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)