Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ReactDay 2022 - Unit testing
Search
Luca Del Puppo
October 19, 2022
Programming
150
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
170
Aware dependencies using Nx Graph
puppo
0
100
Prisma the ORM that node was waiting for
puppo
0
140
How to scale up your projects like a pro
puppo
0
160
Alive, Tipi Sopravvisuti
puppo
0
150
How to scale up your angular projects like a pro
puppo
0
220
Prisma in the Air
puppo
0
490
Can typescript definitions survive even at runtime?
puppo
0
170
Is it possible to build your UI components using only web components?
puppo
0
130
Other Decks in Programming
See All in Programming
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
5.4k
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
360
CodeRabbitの効果検証と過ごしてみた3ヶ月
armondando
0
140
ジョジョの世界をXRで再現する
mofurune
0
110
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
390
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
340
残高管理から台帳サービスへの進化
artoy
0
140
Workers Cache を知る
syumai
0
330
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
150
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.1k
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
620
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
120
Featured
See All Featured
A Tale of Four Properties
chriscoyier
163
24k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
First, design no harm
axbom
PRO
2
1.3k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
58k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
420
We Are The Robots
honzajavorek
0
380
Producing Creativity
orderedlist
PRO
348
41k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
260
Build your cross-platform service in a week with App Engine
jlugia
234
19k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
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