Why is env.RegisterWorkflow not required for parent workflow?

If you comment out line 42, the test still pass. I’m a bit confused since I thought you have to register the workflow before you execute it.

However, line 43 is required and SampleCronWorkflow is the child workflow that is executed. 42 is the main workflow, so I would expected that to be registered as well.

Any insights?

Thanks,
Derek

Hey Derek,

You are correct that L42 is optional, whereas L43 is necessary.

This is because of the implementation of executeWorkflow in the test helper registers the target workflow implicitly for convenience reason. The child workflows do not have this treatment in the test env.