I’ve been trying to figure out how to do some request testing on an Azure Functions project. My goal is to submit HTTP requests with JSON bodies, have them handled by the Functions running through as much of the real production code as possible, and then get back an HTTP response with a JSON payload. […]
I recently helped build a web app using React and TypeScript, which needed to load and display a lot of page-specific data from a REST API. One challenge on this project was figuring out a nice way to deal with loading data and making it available to any components on the page that needed access […]
Since the summer of 2019, WebdriverIO has fully supported the W3C WebDriver protocol (announced in this post). As part of upgrading to the latest v5 version of WebdriverIO, I decided to also switch over to using the W3C protocol for our tests that use Chrome / ChromeDriver. After switching to the W3C protocol, we found […]
Of late, I’ve become enamored with using Docker containers for anything and everything (I recently posted about doing development in a Docker container). So when I needed to do some work on a small Azure Functions project, the first thing I investigated was whether or not I could do my development/testing in a Docker container […]
A couple of years ago, Will Pleasant-Ryan wrote Docker for Mac: Overcoming Slow Mounted Volumes, describing his desire to use Docker for local development. He talked about some of the filesystem performance problems that can arise when using a shared volume from the host machine on Mac OS X, along with some potential workarounds and […]
Unit testing, integration testing, acceptance testing, exploratory testing—all are important methods that contribute to delivering quality software. But there’s another important kind of testing that is often overlooked, and that’s testing the production environment. For example, has the production environment been configured correctly so the system can successfully send email? Can the system access a […]
My team and I recently decided that we should store user-generated binary files in our PostgreSQL database so that a user could download them at a later time. This is different from uploading those files to something like Amazon S3 (which we’ll likely consider migrating to at some point down the road).
Both GraphQL and TypeScript support the concept of discriminated unions (also known as tagged unions). In this post, I’ll walk through setting up an example GraphQL schema and the corresponding TypeScript types, along with writing a query to retrieve a union type.
In my last post, I showed how to write a higher-order function that could wrap an existing function without losing the original function’s types. Today, I’m going to show how you can use that same technique to wrap an existing function for a different result–to execute it in a background process using the workerpool npm […]
As of TypeScript 3.1, the lib.es5.d.ts file provides a couple of predefined types that are very helpful when trying to write generic higher-order functions. In this post, I’m going to show an example of using the Parameters and ReturnType predefined types for just that purpose.