While implementing a Stripe Connect integration, I repeatedly came across the tedious task of onboarding Express accounts to test the integration, whether that be manual or automated testing. Creating an Express account using Stripe's API is an easy task, but in order for the account to be verified to accept payments and transfers, the account needs to manually complete onboarding forms on a Stripe hosted page. Let's take a look at how I automated the onboarding process.
👋 I'm Kishan, a software engineer.
Welcome to my development playground.
I'm working on a project that relies heavily on Stripe webhooks and while implementing the webhook handler, I noticed the lack of type safety increases the risk of error in my implementation. This could be something simple like misspelling the event name or trying to access the event's
data.object fields incorrectly. For this reason, I built a way to generate typings for all webhook events to strongly type the event object.
Stripe supports many different subscription models such as flat fee, metered billing based on usage, and scheduled subscriptions. In any case, testing your subscription through the course of it's lifecycle is crucial before going live. With the help of Stripe's test clocks feature, this is possible!
There can be many potential causes for flaky Cypress tests and this can be a cause of frustration when it comes to testing. I recently upgraded a project to Cypress 10 and discovered one of the causes for flakiness was due to assertions running prematurely before network requests had completed. I assumed Cypress automagically handled waiting for requests to finish but that's not the case. So let's take a look at how to wait for network requests to finish before your assertions are run.
Angular standalone components! This is a feature that I've been wanting for a while. After reading the RFC last year, it's great to see this feature come to fruition in Angular 14. It's a huge improvement to developer experience because we no longer need
NgModule which reduces a lot of boilerplate, and in turn eliminates common errors that occur like forgetting to declare components.