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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
150
Aware dependencies using Nx Graph
puppo
0
90
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
450
Can typescript definitions survive even at runtime?
puppo
0
140
Is it possible to build your UI components using only web components?
puppo
0
100
Other Decks in Programming
See All in Programming
Symfony AI in Action - SymfonyLive Berlin 2026
chr_hertel
1
130
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
490
Kingdom of the Machine
yui_knk
2
1.4k
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
480
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
2.9k
10 Tips of AWS ~Gen AI on AWS~
licux
5
540
From Formal Specification to Property Based Test
ohbarye
0
1.2k
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
1.2k
AlarmKitで明後日起きれるアラームアプリを作る
trickart
0
120
[RubyKaigi 2026] Require Hooks
palkan
1
300
AIを導入する前にやるべきこと
negima
2
340
なぜあなたのコードには「コシ」がないのか?〜AI時代に問う、最後まで美味しい設計と戦略〜 #phpconkagawa / phpconkagawa2026
shogogg
0
150
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
220
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
210
Embracing the Ebb and Flow
colly
88
5k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
180
Unsuck your backbone
ammeep
672
58k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
500
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Being A Developer After 40
akosma
91
590k
Un-Boring Meetings
codingconduct
0
280
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