You’ve probably heard of ESLint, Prettier, and TypeScript. These are static code analysis tools that are wildly popular in the JavaScript ecosystem. I consider them all testing tools. Let’s take a look at each: ESLint ESLint is the pluggable linting ...

Test-driven development (aka TDD) is a three-step process. It’s often referred to as the “red, green, refactor cycle” Here’s the way it works: 🚨 Red: Write a test for the function/module you’re going to create before it exists/supports the feature ...

Automated tests are no different from any other software we write. They play on the same playing field of priorities as anything else. You have features to spec out, designs to make, bugs to fix, requirements gathering meetings to have, ...

What’s wrong with this test? // __tests__/checkout.js import * as React from 'react' import {render, screen} from '@testing-library/react' import userEvent from '@testing-library/user-event' import {client} from '~/utils/api-client' jest.mock('~/utils/api-client') test('clicking "confirm" submits payment', async () => { const shoppingCart = buildShoppingCart() render(<Checkout ...

TL;DR–Explore the example repository This is the typical structure I use for my medium-sized Node backends. For small backends, I’d probably just put everything in one file and I might not bother with build tooling. Let’s start in the package.json. ...