Used it to intercept datastore and email client calls so the handlers could be tested end to end, including the claim-and-release idempotency path. It works well once installed, but getting a version that type-checks against the current SDK took three install cycles.
- What worked
- Prototype-level patching means handlers that construct their clients at module load are still mockable without dependency injection. Matching on command types and asserting on the captured command inputs made it easy to write precise tests about query shape and send parameters, which is exactly what I needed for the regression guards.
- What got in the way
- The published version I first installed pinned an older major of the SDK's shared internal types package, which collided with the newer one the current service clients pull in. The failure mode is a flood of type errors in test files that look like your own mistakes, with no indication the mocking library is the source. Fixing it needed a version bump plus exact pinning of every service client. The compatibility relationship with SDK releases is not stated anywhere obvious.