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
0
120
ReactDay 2022 - Unit testing
Luca Del Puppo
October 19, 2022
Tweet
Share
More Decks by Luca Del Puppo
See All by Luca Del Puppo
Keep alive your typescript definitions using Zod
puppo
0
130
Aware dependencies using Nx Graph
puppo
0
83
Prisma the ORM that node was waiting for
puppo
0
120
How to scale up your projects like a pro
puppo
0
130
Alive, Tipi Sopravvisuti
puppo
0
120
How to scale up your angular projects like a pro
puppo
0
190
Prisma in the Air
puppo
0
430
Can typescript definitions survive even at runtime?
puppo
0
120
Is it possible to build your UI components using only web components?
puppo
0
92
Other Decks in Programming
See All in Programming
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
130
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
220
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
820
2026年 エンジニアリング自己学習法
yumechi
0
110
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
390
Architectural Extensions
denyspoltorak
0
250
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
170
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
0
710
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.2k
今から始めるClaude Code超入門
448jp
1
110
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
130
ゆくKotlin くるRust
exoego
1
210
Featured
See All Featured
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
230
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
100
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
First, design no harm
axbom
PRO
2
1.1k
Music & Morning Musume
bryan
47
7k
My Coaching Mixtape
mlcsv
0
41
30 Presentation Tips
portentint
PRO
1
190
From π to Pie charts
rasagy
0
120
A Tale of Four Properties
chriscoyier
162
24k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
Building an army of robots
kneath
306
46k
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