createTestModel
Callable
Type parameters
- TMachine: AnyStateMachine
Parameters
machine: TMachine
The state machine used to represent the abstract model.
optionaloptions: Partial<TestModelOptions<SnapshotFrom<TMachine>, ResolveEventType<TMachine>>>
Options for the created test model:
events
: an object mapping string event types (e.g.,SUBMIT
) to an event test config (e.g.,{exec: () => {...}, cases: [...]}
)
Returns TestModel<SnapshotFrom<TMachine>, EventFrom<TMachine>, unknown>
Creates a test model that represents an abstract model of a system under test (SUT).
The test model is used to generate test paths, which are used to verify that states in the
machine
are reachable in the SUT.