Stop mocking fetch
Discusses the pitfalls of mocking API clients in tests and suggests mocking `window.fetch` directly for better confidence.
Discusses the pitfalls of mocking API clients in tests and suggests mocking `window.fetch` directly for better confidence.
A guide for developers on when to prioritize writing tests versus fixing bugs, based on cost-benefit analysis of different scenarios.
Explores the challenges of testing date/time functions in Python and introduces dependency injection as a solution to mock time for reliable unit tests.
A guide on switching a Django project's test runner from the default to pytest, covering installation, configuration, and benefits.
A developer uses Test Driven Development to fix a bug in a Django app, writing a test, fixing the code, and refactoring.
Explains the risks of committing focused tests and provides multiple technical solutions to prevent it, including VS Code extensions, linter rules, and pre-commit hooks.
Explores representing a state machine as a simple string, detailing the parsing logic and rules needed for conversion.
A developer changes a Django model relationship from ForeignKey to ManyToManyField and fixes the resulting test errors.
Explains the importance of documenting unit tests with examples and best practices for writing clear test comments.
Argues against using code coverage as a strict target, explaining why high coverage doesn't guarantee good tests and can misdirect developer effort.
A guide to improving test error messages when creating abstractions in JavaScript testing frameworks like Jest.
The creator of React Testing Library explains common mistakes developers make and provides advice on how to write better tests.
A developer continues building a SaaS product's user onboarding flow using Python and Django, focusing on form creation and unit testing.
A developer argues for starting with larger, monolithic components in Angular to avoid premature abstraction and complexity, then refactoring for performance or reusability.
A guide to creating and managing test fixtures for Django models using Pytest, focusing on the 'factory as a service' pattern.
A tutorial on testing lists of items using Cypress, covering methods like .then() and .each() for efficient UI testing.
A guide to setting up free continuous integration for Laravel projects using GitHub Actions, including debugging and environment secrets.
A step-by-step guide to setting up continuous integration for Django projects using CircleCI, including configuring tests and pipelines.
Explains the Go 1.14 improvement where `go test -v` streams `t.Log` output in real-time, aiding debugging of long-running tests.
A guide to enhancing Cypress test failure screenshots by using cy.log() commands to add step-by-step context and improve debugging efficiency.