Skip to main content

Azure Pipelines meet Jest

· 4 min read
John Reilly
OSS Engineer - TypeScript, Azure, React, Node.js, .NET

This post explains how to integrate the tremendous test runner Jest with the continuous integration platform Azure Pipelines. Perhaps we're setting up a new project and we've created a new React app with Create React App. This ships with Jest support out of the box. How do we get that plugged into Pipelines such that:

  1. Tests run as part of our pipeline
  2. A failing test fails the build
  3. Test results reported in Azure Pipelines UI

Related: there is a post on Vitest and Azure Pipelines.

Bulletproof uniq with TypeScript generics (yay code reviews!)

· 4 min read
John Reilly
OSS Engineer - TypeScript, Azure, React, Node.js, .NET

Never neglect the possibilities of a code review. There are times when you raise a PR and all you want is for everyone to hit approve so you can merge, merge and ship, ship! This can be a missed opportunity. For as much as I'd like to imagine my code is perfect, it's patently not. There's always scope for improvement.

Throttling data requests with React Hooks

· 14 min read
John Reilly
OSS Engineer - TypeScript, Azure, React, Node.js, .NET

When an application loads data, typically relatively few HTTP requests will be made. For example, if we imagine we're making a student administration application, then a "view" screen might make a single HTTP request to load that student's data before displaying it.

Safari: The Mysterious Case of the Empty Download

· 3 min read
John Reilly
OSS Engineer - TypeScript, Azure, React, Node.js, .NET

Safari wants a Content-Type header in responses. Even if the response is Content-Length: 0. Without this, Safari can attempt to trigger an empty download. Don't argue; just go with it; some browsers are strange.

Autofac 6, integration tests and .NET generic hosting

· 3 min read
John Reilly
OSS Engineer - TypeScript, Azure, React, Node.js, .NET

I blogged a little while ago around to support integration tests using Autofac. This was specific to Autofac but documented a workaround for a long standing issue with ConfigureTestContainer that was introduced into .NET core 3.0 which affects all third-party containers that use ConfigureTestContainer in their tests.

A title image for the blog featuring the Autofac logo

Why your team needs a newsfeed

· 5 min read
John Reilly
OSS Engineer - TypeScript, Azure, React, Node.js, .NET

I'm part of a team that builds an online platform. I'm often preoccupied by how to narrow the gap between our users and "us" - the people that build the platform. It's important we understand how people use and interact with what we've built. If we don't then we're liable to waste our time and energy building the wrong things. Or the wrong amount of the right things.

Task.WhenAll / Select is a footgun 👟🔫

· 6 min read
John Reilly
OSS Engineer - TypeScript, Azure, React, Node.js, .NET

This post differs from my typical fayre. Most often I write "here's how to do a thing". This is not that. It's more "don't do this thing I did". And maybe also, "how can we avoid a situation like this happening again in future?". On this topic I very much don't have all the answers - but by putting my thoughts down maybe I'll learn and maybe others will educate me. I would love that!

Up to the clouds!

· 11 min read
John Reilly
OSS Engineer - TypeScript, Azure, React, Node.js, .NET

This last four months has been quite the departure for me. Most typically I find myself building applications; for this last period of time I've been taking the platform that I work on, and been migrating it from running on our on premise servers to running in the cloud.