testing library

Run the registered App Intents / AppFunctions handlers under flutter test, without a simulator or a native host.

See AppIntentsHarness. The manifest it optionally reads comes from dart run app_intents_codegen:describe -o test/app_intents.json.

Classes

AppIntentsHarness
Lists and runs the registered Dart handlers the way a native caller does, under plain flutter test.
AppIntentsInventory
What AppIntentsHarness.list found.
AppIntentsManifest
What dart run app_intents_codegen:describe declared: every intent, entity and enum, with a JSON Schema for each intent's params.
DeclaredEntity
One @EntitySpec from the manifest.
DeclaredEnum
One @EnumSpec from the manifest.
DeclaredIntent
One @IntentSpec from the manifest.
HarnessProgress
One progress report from a handler.
HarnessRun
An intent started with AppIntentsHarness.start.

Functions

validateJsonSchema(Object? value, Map<String, Object?> schema, {String path = r'$'}) → List<String>
A validator for the JSON Schema subset app_intents_codegen:describe emits: type (a name or a list), enum, properties, required, additionalProperties: false, items, anyOf and format: date-time.

Exceptions / Errors

AppIntentsSchemaViolation
Params or entities that do not match the manifest's schema.