stripe-perl
stripe-perl copied to clipboard
use stripe-mock for unit tests
in perusing some of the other SDKs, specifically looking for how they test various Source
types, i discovered various test tokens, like src_123
, which don't seem to work against the Stripe servers, even in test mode.
my eventual conclusion was that these SDKs are using stripe-mock.
this setup is clearly beneficial for:
- being able to test the SDK more-thoroughly at user install time
- avoiding unnecessary test-object creation, and periodic object deletion, for developers
i have no idea how API versioning intersects with stripe-mock
, or the ability to test complex flows, such as auth/capture. and i am sure that there are other complexities to consider.
mostly a note to future-self.