Unit test (jest) failed when running activity - "Activity context not initialized"


I’m trying to run Activity in unit test using Jest, but it seems there is no Context for the activity.
I did as same as in the dev-guide - Testing - TypeScript SDK feature guide | Temporal Documentation

BTW, it worked well until I upgraded version to 1.8.6.

Make sure you only have one version of any @temporalio package.

You may need to remove your node_modules and lock file and reinstall.

Works, thank you very much.