Debugging and Testing Gatsby

Once your Gatsby implementation is complete, you’ll often find that you need to troubleshoot some issues before you can deploy your site to production. In Gatsby, it’s possible to do test-driven development (TDD) by writing unit tests in Jest and performing tests on various aspects of the development experience.

Even with a robust test architecture, however, sometimes Gatsby sites fail for obscure reasons and require a deeper level of troubleshooting and debugging. Fortunately, the Gatsby ecosystem provides a variety of tools for testing your sites ahead of time to help you avoid problems and debug them when issues arise. Before your site can go into production, it’s essential to ensure that it functions the way you intend.

In this section, we’ll cover testing strategies, including unit testing and component-level testing, and debugging tactics, including for static builds, server-side rendering issues, and other issues that arise during development.

NOTE

Sometimes during development, it will be useful to spin up a local development server that provides local HTTPS support. For more information, consult the Gatsby documentation’s guide to local HTTPS.


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *