---
title: "result(_:)"
framework: appintentstesting
role: symbol
role_heading: Instance Method
platforms: [iOS 27.3+, iPadOS 27.3+, Mac Catalyst 27.3+, macOS 27.3+, tvOS 27.3+, visionOS 27.3+, watchOS 27.3+]
path: "appintentstesting/appintentexpectation/result(_:)"
---

# result(_:)

Returns an intent expectation that also requires the intent’s result to satisfy the value expectation you specify.

## Declaration

```swift
func result(_ resultExpectation: (any IntentValueExpectation)?) -> AppIntentExpectation
```

## Parameters

- `resultExpectation`: The value expectation for the intent’s result. Pass doc://com.apple.AppIntentsTesting/documentation/AppIntentsTesting/IntentValueExpectation/isNil to expect no result, or nil to leave the result unchecked.

## Return Value

Return Value An intent expectation that checks the same parameters and uses resultExpectation for the result, replacing any earlier result expectation.

## Discussion

Discussion Call this method after expect to check an intent’s parameters and its result together: let expectation = createEventIntentDefinition     .expect(title: .contains("NASA"))     .result(eventEntityDefinition)
