Fake or Mock an API with JSON Server

JSON Server is an easy and quick-to-set-up module that you can use to fake or mock an API. You can find the basics in the documentation, and many articles regurgitate the same info. In this post, though, I intend to cover a few of the more complex things you can do with JSON Server. Read more on Fake or Mock an API with JSON Server…

An Intro to React Navigation for React Native

When you first sit down to write a React Native app, you’ll find that after making your first screen, you don’t have an easy way to navigate to another. React Native doesn’t have that functionality built in, but in this post, I’ll outline how to use a library that makes it possible: React Navigation. Read more on An Intro to React Navigation for React Native…

Avoid Careless Production Mistakes with Custom Scripts

In the wise words of @stahnma,

“Everybody has a testing environment. Some people are lucky enough to have a totally separate environment to run production in.”

Thankfully, the project I’m working on has multiple environments: production (the most recently-released version), staging (for pre-release testing), dev (for dev team use and testing), and multiple review apps (for feature validation). Read more on Avoid Careless Production Mistakes with Custom Scripts…

PDF Snapshot Testing with Node and GraphicsMagick

The task I am working on this week involves generating downloadable PDF files for customer and supplier orders. We’d like to drive the implementation using tests and be able to find any regressions in the code automatically.

After looking at different alternatives for accomplishing this, we decided to try a visual snapshot approach similar to the way Jest does snapshot testing.
Read more on PDF Snapshot Testing with Node and GraphicsMagick…

Five Chrome DevTools Tips for Troubleshooting Web Apps

I recently needed to find and fix a bug in a web app I’ve been working on. The bug had something to do with code that was updating the dimensions of a third-party generated UI component whenever the window was resized. While troubleshooting the issue, I repeatedly used a handful of the tools provided by Chrome DevTools. Some of these I’ve used many times in the past, but a couple of them were new to me, so I thought I’d discuss them here. Read more on Five Chrome DevTools Tips for Troubleshooting Web Apps…

An Introduction to Property-Based Testing with JavaScript

Property-based testing is a powerful technique that’s been widely and successfully applied to functional-style codebases for a long time. As functional programming continues to get more and more popular among JavaScript developers, the value of this style of testing is becoming more obvious to a wider audience. Read more on An Introduction to Property-Based Testing with JavaScript…

Importing with Absolute Paths using webpack in JavaScript/TypeScript

Using relative paths in your import statements is great for “Hello World” examples and blog posts. But when used in large projects with hundreds of files and deep hierarchical directory structures, relative paths become a nightmare (see Rob Ashton’s post Stop using relative paths in your JavaScripts for some of the reasons why this is so). Read more on Importing with Absolute Paths using webpack in JavaScript/TypeScript…