JONDJONES.COM
  • About
  • CMS
  • Clean C#
  • Javascript
  • Resources
  • Ask Jon
  • Hire Me
  • Contact
Follow Me
  • ;

what are you looking for?

JONDJONES.COM
  • About
    About Me
    • Who Is Jon D Jones?
    • Things I Use
    • My Projects
    How You Can Help
    • How You Can Support This Site
    • Submit A Guest Post
  • CMS
    CMS Tutorials
    • Umbraco
    • Sitecore
    • Episerver
    Resources
    • Episerver: The Missing Manual
    • #ILoveEpiserver
    • #ILoveUmbraco
  • Clean C#
    • TDD
    • Clean Code
    • Devops
    • Faster Page Load Times
    • Developer Tool Tutorials
  • Javascript
    Tutorials
    • Javascript
    • React
    • CSS
    Resources
    • #ILoveJavascript
    • Dev Tools List
    • #ILoveReact
  • Resources
    Free Guides
    • Shit My Websites Down...
    • #ILoveJavascript
    • #ILoveReact
    • #ILoveTechnicalInterviews
    • Land Your First Contract
    Books
    • Episerver Missing Manual
  • Ask Jon
  • Hire Me
    My Services
    • Umbraco Freelancer
    • Episerver Freelancer
    • Sitecore Freelancer
    • Javascript Freelancer
    My Company & Experience
    • Digital Prompt
    • My Portfolio
    • LinkedIn Profile
    • Stackoverflow CV
  • Contact

Testing React Components

  • Homepage
  • Frontend
  • React
  • Testing React Components
How To Write Tests To Check Your React Component Is Generating The Correct HTML
How To Write Tests To Check Your React Component Is Generating The Correct HTML
Mon 18 March, 2019
Useful Code Snippets To Help You Test Your React Components
Useful Code Snippets To Help You Test Your React Components
Tue 19 March, 2019
Code Snippets To Help You Unit Test Forms Written In React
Code Snippets To Help You Unit Test Forms Written In React
Fri 17 May, 2019
Using Yarn To Bump Your React.js Packages
Using Yarn To Bump Your React.js Packages
Mon 29 July, 2019
Unit Testing React Redux Connected Components
Unit Testing React Redux Connected Components
Tue 1 October, 2019
Running A Single Test Using Jest
Running A Single Test Using Jest
Tue 5 November, 2019
Testing React Components

Writing tests can either be a quick 5 minute job, it can also be a few hours of hell.  The differentiator...  is mainly down to how the component has been written.    For a lot of codebases that I come across, writing tests is usually harder than it needs to be.  Codebases that are hard to test, usually occur when the developers in the team think of tests as an afterthought. 

I've been writing and code reviewing tests for over a decade.  Due to that experience I tend to naturally build my components in a test friendly way.  Some people reading this might be test-first evangelist and no developer should write code until a test has been written.   I do agree high-test coverage is an essential part of the development life-cycle, there are situations you just need to get somethings working, then refine it and write tests after you understand a problem is abetter approach.  

In this section you will find code examples and tutorials that will help you to test your react components.  

WELCOME

Hi, I'm Jon, I write articles about creating and optimizing websites to help your business meet its goals. I am a technical architect and technology fanatic by profession. You can find out more about me by joining my newsletter.

Latest Posts
  • Umbraco V8 Fails To Load On Remote Server
  • How To Enable Optional Chaining Within Your Javascript Project
  • How To Call An API Within A React.js App
  • Quick And Dirty Guide To Deploying Your React App

© Jon D Jones