I'm currently developing a Shopify App in Node.js and have successfully implemented Shopify OAuth using the @shopify/shopify-api package. Now, I'm facing challenges while trying to write tests for the OAuth-related code.
Specifically, I'm having difficulty stubbing the Shopify Client for OAuth APIs. The methods causing issues are:
I've attempted to use Sinon Stubs, but haven't been successful so far. It's possible that there's some intricacy with the HTTP response handling in these API methods that I'm not fully understanding.
If anyone has experience with stubbing these methods for testing purposes or can provide insights into the nuances of handling HTTP responses in this context, I would greatly appreciate your assistance.
Thank you in advance for your help!
Dive into the world of Print-on-Demand and discover how it can transform your online busin...By Imogen Feb 19, 2024
Discover how to transform your online store into a delightful shopping destination. Learn ...By Ollie Feb 13, 2024