Sometimes when writing Jest unit tests you are going to want to be able to loop over items to quickly test different cases. Whether this be looping over an array of items, or counting between numbers in your Jest Test....
Solution to Vimeo videos/iframes negatively effecting website load speed. Use Intersection Observer API To Lazy Load. React component included in article.
Adding Google AdSense to a Gatsby Website. Lazy load the Google AdSense script to keep site speed fast. Examples and walk through in article.
How to mock es6 modules? Solution for how ES6 modules can be mocked in Jest unit tests. Mocking es6 modules with Jest.
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.
Solution to using WordPress shortcodes in NextJS. Replace WordPress shortcode with React Component in NextJS simply.