When spawning a child machine, if a customised clock has been passed to the createActor options, then the customised clock is not inherited by the child machine
This is super important for testing where I want to manually trigger machine timeouts from the tests
Expected result
The clock on the spawned child should be the customised clock
XState version
XState version 5
Description
When spawning a child machine, if a customised clock has been passed to the createActor options, then the customised clock is not inherited by the child machine
This is super important for testing where I want to manually trigger machine timeouts from the tests
Expected result
The clock on the spawned child should be the customised clock
Actual result
The spawned child uses the default clock
Reproduction
https://codesandbox.io/p/devbox/nostalgic-ardinghelli-j299lq
Additional context
Looking at the resolveSpawn function, we have access to the parents clock via
actorScope.self.clock
so the clock can easily be passed here