React | Write a unit test for custom hooks in ten minutes

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • react-hooks-testing-library

    🐏 Simple and complete React hooks testing utilities that encourage good testing practices.

  • When you installed and we can start to write unit tests! There are two methods we need to know in react-hooks-testing-library. The first is renderHook, the second is act:

  • jest

    Delightful JavaScript Testing.

  • Remainder, if you never write any unit tests, don't forget install jest:

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • react-hooks-testing

    For react's useHooks testing

  • I have created the repository, the repository include all above unit test. if you want to try more, just clone!

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts