Master Testing Library with ESLint Plugin
Master writing Testing Library tests with eslint-plugin-testing-library by anticipating common mistakes and following best practices
- 5.0 / 5 (1 rating)
- Published
- Updated
36 mins
12 Videos
Mario Beltrán Alarcón
JS and OSS lover. Senior Software Engineer at Hotjar. Member of the Testing Library organization. Author of eslint-plugin-testing-library and octoclairvoyant.
01Remote
You can take the course from anywhere in the world, as long as you have a computer and an internet connection.
02Self-Paced
Learn at your own pace, whenever it's convenient for you. With no rigid schedule to worry about, you can take the course on your own terms.
03Community
Join a vibrant community of other students who are also learning with Master Testing Library with ESLint Plugin. Ask questions, get feedback and collaborate with others to take your skills to the next level.
04Structured
Learn in a cohesive fashion that's easy to follow. With a clear progression from basic principles to advanced techniques, you'll grow stronger and more skilled with each module.
- How to set up eslint-plugin-testing-library in your codebase 
- Getting ESLint feedback directly in your code editor and your terminal 
- ESLint advanced config for getting more granular control over the linting process 
- Better understanding of Testing Library errors 
- Anticipating common issues 
- Preventing flaky tests 
- Following best practices for Testing Library tests 
- Enforcing consistency across your tests 
Testing Library is a great bunch of utils to write tests for your UI. It has become the favorite testing choice of many users since it encourages you to write more maintainable and reliable tests, encourages best practices, and doesn't focus on implementation but behavior.
However, testing your app correctly with Testing Library is not always straightforward. What query variant fits better for this situation? How should I check appearance/disappearance? What is the best way to handle async behaviors? Why am I seeing this particular error or warning? Why am I not getting the expected element? These are very typical questions while writing tests with Testing Library.
You are not alone! This course aims to help you master these situations with the assistance of eslint-plugin-testing-library: the official ESLint plugin for Testing Library.
The course will boost your Testing Library skills by using this plugin as a companion when writing tests. You will get instant feedback by linting your tests code, so you can follow best practices and anticipate common mistakes for Testing Library, as well as better understand its utils and their main purposes.
Get ready to say goodbye to flaky tests!
Our students work at
Course Syllabus and Content
Plugin features and set up
8 Lessons 22 Minutes
- Introduction to module 1 - Plugin features and set up 
- An overview of the plugin 
- In this course we won't be building an app from scratch, but fixing existing examples and apps containing errors. We need to download and setup the provided sample codes to be able to work with them in the corresponding lessons. 
- Get instant feedback by setting ESLint in your code editor 
- Install and configure eslint-plugin-testing-library in your codebase 
- The advanced config to lint only what's necessary 
- Guidelines to migrate from a previous version to the latest v5 
- How to take advantage of the plugin when working in a Create React App project 
Rules for following best practices
4 Lessons 14 Minutes
- Introduction to module 2 - Rules for following best practices 
- Understanding the errors reported by the rule - no-manual-cleanup
- Understanding the errors reported by the rule - prefer-screen-queries
- Understanding the errors reported by the rule - no-await-sync-query
Rules for preventing errors
0 Lessons
Rules for style guidelines & Advanced Features
0 Lessons
Meet the Course Instructor
Frequently Asked Questions
Who is this course for?
This is a course about mastering Testing Library, so it's ideal for those with a base knowledge of writing tests who want to follow best practices, prevent common problems, and take advantage of the advanced Testing Library utils. Although the examples we will see are mostly written in React, the course is perfectly suitable for developers feeling confortable in plain DOM, Angular, or Vue
Are there any prerequisites?
Yes. The course assumes that you have a fair understanding of writing tests with Jest and Testing Library, and basic ESLint usage.
What if I need help?
You can ask us questions any time through the community Discord channel or by sending us a message.