Setup Testing Env: Jest, React Testing Library, eslint, GitHub Actions -React.js Testing Tutorial #2

Pubblicato il: 19 luglio 2021
sul canale di: Bruno Antunes
28,742
724

In this video we will setup a Next.js application with all the testing tools needed for your success. We will setup jest, react testing library, eslint plugins and GitHub Actions.

The React Testing Library is a very light-weight solution for testing React components. It provides light utility functions on top of react-dom and react-dom/test-utils, in a way that encourages better testing practices.

eslint plugins are very important to helps us during testing. We will install a plugin for Jest and another one for React Testing Library.

We will also setup prettier and eslint to run before every commit using lint-staged.

We setup GitHub actions to run on every commit we do to our main branch and every pull request we open on the repository. We will also add a code coverage threshold, which means that if the test code coverage is below 100%, our build will fail.

react testing library = @testing-library/react npm package

----
All the videos in this series (React.js Testing Tutorial):    • React.js Unit Testing and Integration Test...  
----
Join the channel to support my content:
   / @brunoantunespt  
-----

----
GitHub Repository: https://github.com/bmvantunes/youtube...
----

----
Timestamps:
00:00 Introduction
02:20 Create React.js Application using Next.js - create-next-app
02:56 ts-jest: Install and configuration
06:10 check the initial example to see it failing with ts-jest
06:45 react testing library: Install and configuration
15:10 eslint: Install and configuration
21:00 eslint jest plugin: Install and configuration
24:00 eslint react testing library: Install and configuration
25:30 lint-staged and prettier: Install and configuration
28:15 GitHub Actions: Linux, Windows, MacOS
29:47 Code Coverage Threshold: Fail GitHub Actions if not 100% code coverage
----
#react #jest #testing
----
Follow me on:
Twitter:   / bmvantunes  
Dev.to: https://dev.to/bmvantunes
Website: https://brunoantunes.net
GitHub: https://github.com/bmvantunes
LinkedIn:   / bmvantunes  


In questa pagina del sito puoi guardare il video online Setup Testing Env: Jest, React Testing Library, eslint, GitHub Actions -React.js Testing Tutorial #2 della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Bruno Antunes 19 luglio 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 28,742 volte e gli è piaciuto 724 spettatori. Buona visione!