#All3nn1ck
1 messages · Page 1 of 1 (latest)
Hi there, can you describe more about this problem?
Hi, I'm using Jenkins as CI/CD pipeline and it is inside a Docker container. When I run my stripe unit tests the only line of code that breaks each of my tests is the following: session = await this.stripe.checkout.sessions.create(options as any);
I've commented out that line of code and the tests are now ok
It is not a problem with my unit tests though. Everytime I try to use that line of code I get an data: { code: 'ECONNRESET' }
So I think it has to do something with docker connection, because when I run my tests in my local machine without docker they are ok
You can use stripe-mock (https://github.com/stripe/stripe-mock) in your unit test so that you don't need to send network requests to Stripe API during the test.
Wow thank you I didn't know the existence of this