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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
91
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
140
How to scale up your angular projects like a pro
puppo
0
200
Prisma in the Air
puppo
0
460
Can typescript definitions survive even at runtime?
puppo
0
140
Is it possible to build your UI components using only web components?
puppo
0
110
Other Decks in Programming
See All in Programming
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
2.1k
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.4k
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1.3k
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
340
自動レビューエンジンの実装と運用 ~レビューのない世界へ~
kurukuru1999
2
310
Modding RubyKaigi for Myself
yui_knk
0
870
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
3
1.4k
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
160
AI時代のUIはどこへ行く?その2!
yusukebe
19
6.4k
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.5k
oxlintはeslint/typescript-eslintを置き換えられるのか
shomafujita
2
310
プロパティの順序で型推論が壊れる!? TypeScript6.0の修正からContext-Sensitivityの仕組みを追う
bicstone
2
1.3k
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
We Have a Design System, Now What?
morganepeng
55
8.2k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
250
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
210
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
260
Documentation Writing (for coders)
carmenintech
77
5.4k
How to make the Groovebox
asonas
2
2.2k
Ruling the World: When Life Gets Gamed
codingconduct
0
240
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Claude Code のすすめ
schroneko
67
220k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
200
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
930
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