Snapshot testing was popularized by frameworks like Jest in order to quickly and effectively track unintended changes to React components. However, the concept can be taken away from the front end and find equal utility for back-end testing.
In this article, I’ll show you how to easily achieve large coverage of your API through integration tests using Jest snapshots in Node.js.
In the next few sections, we’ll cover:
So let's get started.
Testing often has a sweet spot. The goal is rarely 100% coverage, but you should aim to use the right kind of testing and find a balance between fluidity and stability. …
I recently built a platform on Stripe, which has fantastic documentation but a lot of it. I found it difficult to connect each service for a complete end-to-end flow. In this article, I’ve consolidated hours of research and reading into a step-by-step guide with links to the official docs.
Stripe provides a fantastic suite of tools to process one-time and recurring payments. It’s made the development of platforms and marketplaces a far more realistic goal for small teams.
With the Stripe API you no longer have to concern yourself with compliance or security edge cases.
Here I’ll be using Stripe Connect to show you how a platform can process payments on behalf of a supplier. You’ll also be able to take a commission on each transaction. …
I always liked the idea of GitHub actions because it means less third-party dependencies on your CI/CD flow. The UI, however, is somewhat lacking compared to other providers such as Circle CI, but this is something improving over time.
Here I’ll be using Cypress to test the full end-to-end flow of a web app connected to a mocked GraphQL API. The fact the API is GraphQL makes local stubbing with Cypress difficult, due to all requests going to the same endpoint. I feel mocking the API is, therefore, the best way to go.
I’ll be focusing purely on GitHub actions rather than the configuration of the application itself. …