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
100
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
110
Aware dependencies using Nx Graph
puppo
0
73
Prisma the ORM that node was waiting for
puppo
0
94
How to scale up your projects like a pro
puppo
0
120
Alive, Tipi Sopravvisuti
puppo
0
100
How to scale up your angular projects like a pro
puppo
0
150
Prisma in the Air
puppo
0
410
Can typescript definitions survive even at runtime?
puppo
0
110
Is it possible to build your UI components using only web components?
puppo
0
83
Other Decks in Programming
See All in Programming
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
2
140
20250628_非エンジニアがバイブコーディングしてみた
ponponmikankan
0
660
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
750
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.5k
C++20 射影変換
faithandbrave
0
570
AI時代のソフトウェア開発を考える(2025/07版) / Agentic Software Engineering Findy 2025-07 Edition
twada
PRO
68
21k
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
220
RailsGirls IZUMO スポンサーLT
16bitidol
0
170
Result型で“失敗”を型にするPHPコードの書き方
kajitack
5
600
関数型まつりレポート for JuliaTokai #22
antimon2
0
160
WindowInsetsだってテストしたい
ryunen344
1
240
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
2
620
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
950
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
730
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Site-Speed That Sticks
csswizardry
10
680
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
810
The Language of Interfaces
destraynor
158
25k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
5
260
Scaling GitHub
holman
459
140k
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