An example of how to permanently redirect a URL using Next.js. 301 is actually a 308, and how to wildcard path match within next.config.js
A basic overview of testing with Jest and React Testing Library. What are the differences between the two? How should they be used?
An example of how create a manifest file within Next JS Pages Router using headless WordPress. WP GraphQL registering code snippets, and step by step explanation.
A walkthrough and example of how to use Yoast sitemap XML files from a headless WordPress install in Next JS.
A walkthrough on how to mock local storage in Jest tests, as well as how to clear storage in jest tests. Example included.
Mocking date in Redux Toolkit slice with jest in unit tests solution. How to solve new date isostring issue in RTK mock.
How to use Arrange Act Assert pattern in unit testing, and why it is so helpful. Arrange-Act-Assert is powerful because it is simple. By keeping the tests short and concise means clean tests.
Solution for testing that images have rendered in React using Jest. And how to test an image alt and src in jest using React. Including example code.
How to mock a React component in a jest unit test. Example of how to mock a default or named component using React Testing Library.