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
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
160
Aware dependencies using Nx Graph
puppo
0
99
Prisma the ORM that node was waiting for
puppo
0
130
How to scale up your projects like a pro
puppo
0
150
Alive, Tipi Sopravvisuti
puppo
0
150
How to scale up your angular projects like a pro
puppo
0
210
Prisma in the Air
puppo
0
470
Can typescript definitions survive even at runtime?
puppo
0
160
Is it possible to build your UI components using only web components?
puppo
0
120
Other Decks in Programming
See All in Programming
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
170
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
170
霧の中の代数的エフェクト
funnyycat
1
400
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1.1k
act2-costs.pdf
sumedhbala
0
110
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
240
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
500
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
140
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
870
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
510
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
200
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
140
Featured
See All Featured
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
420
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
220
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
390
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.7k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.1k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
220
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
400
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Visualization
eitanlees
152
17k
Thoughts on Productivity
jonyablonski
76
5.2k
Into the Great Unknown - MozCon
thekraken
41
2.6k
How to Ace a Technical Interview
jacobian
281
24k
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