Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ReactDay 2022 - Unit testing
Search
Luca Del Puppo
October 19, 2022
Programming
120
0
Share
ReactDay 2022 - Unit testing
Luca Del Puppo
October 19, 2022
More Decks by Luca Del Puppo
See All by Luca Del Puppo
Keep alive your typescript definitions using Zod
puppo
0
140
Aware dependencies using Nx Graph
puppo
0
87
Prisma the ORM that node was waiting for
puppo
0
120
How to scale up your projects like a pro
puppo
0
140
Alive, Tipi Sopravvisuti
puppo
0
130
How to scale up your angular projects like a pro
puppo
0
200
Prisma in the Air
puppo
0
440
Can typescript definitions survive even at runtime?
puppo
0
130
Is it possible to build your UI components using only web components?
puppo
0
97
Other Decks in Programming
See All in Programming
Java 21/25 Virtual Threads 소개
debop
0
310
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
130
ファインチューニングせずメインコンペを解く方法
pokutuna
0
220
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
380
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.1k
Tamach-sre-3_ANDPAD-shimaison93
mane12yurks38
0
220
Geminiをパートナーに神社DXシステムを個人開発した話(いなめぐDX 開発振り返り)
fujiba
0
130
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
3.7k
我々はなぜ「層」を分けるのか〜「関心の分離」と「抽象化」で手に入れる変更に強いシンプルな設計〜 #phperkaigi / PHPerKaigi 2026
shogogg
2
720
Smarter Angular mit Transformers.js & Prompt API
christianliebel
PRO
1
110
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
200
The free-lunch guide to idea circularity
hollycummins
0
390
Featured
See All Featured
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
140
How to Ace a Technical Interview
jacobian
281
24k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
160
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.8k
YesSQL, Process and Tooling at Scale
rocio
174
15k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.2k
エンジニアに許された特別な時間の終わり
watany
106
240k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
990
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
870
Transcript
Unit Testing React Day 2022
Ego Slide Luca Del Puppo (aka Puppo) Full-Stack Developer at
Flowing a Claranet Italian Company @puppo92 https://www.linkedin.com/in/lucadelpuppo/
[email protected]
The Test Pyramid
Jest vs React Testing Library (RTL)
Sporchiamoci le mani Example https://puppo.github.io/reactday-2022-workshop-testing/ Code https://github.com/Puppo/reactday-2022-workshop-testing
React Testing Library Selectors
Single Element Type of Query 0 Matches 1 Match >1
Matches Retry (Async/Await) getBy... Throw error Return element Throw error No queryBy... Return null Return element Throw error No findBy... Throw error Return element Throw error Yes
Multiple Elements Type of Query 0 Matches 1 Match >1
Matches Retry (Async/Await) getAllBy... Throw error Return array Return array No queryAllBy... Return [] Return array Return array No findAllBy... Throw error Return array Return array Yes
Query types - Queries Accessible to Everyone - getByRole -
getByLabelText - getByPlaceholderText - getByText - getByDisplayValue - Semantic Queries - getByAltText (img, area, input) - getByTitle - Test IDs - getByTestId
Thanks!
Give me your feedback
Milano Frontend - 25 Ottobre 2022 Registrazione https://tinyurl.com/zawyva9z
NgRome - 02 Ottobre 2022 Sito https://t.co/7Z4wXMapva Coupon (-15%) LucaCarbonara22