---
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/appintentdefinition/result(_:)"
---

# result(_:)

Creates an intent expectation that checks the result the intent returns, but none of its parameters.

## Declaration

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

## Parameters

- `resultExpectation`: The value expectation for the intent’s result, such as an doc://com.apple.AppIntentsTesting/documentation/AppIntentsTesting/AppEntityExpectation. Pass doc://com.apple.AppIntentsTesting/documentation/AppIntentsTesting/IntentValueExpectation/isNil to expect no result.

## Return Value

Return Value An intent expectation that checks only the intent’s result.

## Discussion

Discussion To check the result, perform the intent and pass both the intent and its result to isSatisfied(by:result:). If you omit the result, the framework treats the intent as returning no value. For example: let createEventIntentDefinition = definitions.intents["CreateEventIntent"] let intent = createEventIntentDefinition.makeIntent(title: "NASA launch") let result = try await intent.run()

let expectation = createEventIntentDefinition.result(.notNil) let isSatisfied = try await expectation.isSatisfied(     by: intent,     result: result )
