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...
----
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
Watch video Setup Testing Env: Jest, React Testing Library, eslint, GitHub Actions -React.js Testing Tutorial #2 online without registration, duration hours minute second in high quality. This video was added by user Bruno Antunes 19 July 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 27,242 once and liked it 704 people.