#BidBird®
1 messages · Page 1 of 1 (latest)
Hi there! You may find this testing repo useful: https://github.com/stripe/stripe-mock
ok, cool let me take a look
I see, so it wouldn't allow a test suite to run against it in CI?
right, you should make test mode requests or create your own mocks if this basic repo doesn't fit your needs
I have a test suite for the 2018 charges api and am trying to update. It uses interfaces and PaymentGateway and FakePaymentGateway. However, we could create a charge without pinging the server.
If we create PaymentIntents with the test_api key will stripe potentially ban the app when we run CI?
Is that what you mean by test mode requests?
got it, thanks for the context! that's right, you should create PaymentIntents using your test mode keys. when you run CI, you could mock up some of the failures based on the kinds of failures you trigger in test mode so you don't always make requests to the API
Ok, there’s not that many tests. Maybe 50 or so unit tests. That shouldn’t be a problem for our account right?
I recommend creating your own mocks just in case
Ok. Never had a problem before but a stripe dev recently mentioned to not ping the server as much as possible.
Is it possible to create a mock payment intent? Or is that one thing that should be tested on the api