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
150
Aware dependencies using Nx Graph
puppo
0
94
Prisma the ORM that node was waiting for
puppo
0
130
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
210
Prisma in the Air
puppo
0
460
Can typescript definitions survive even at runtime?
puppo
0
150
Is it possible to build your UI components using only web components?
puppo
0
110
Other Decks in Programming
See All in Programming
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
160
Webフレームワークの ベンチマークについて
yusukebe
0
180
Oxlintのカスタムルールの現況
syumai
6
1.1k
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
920
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
140
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
200
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
14
5.8k
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
230
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.5k
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
230
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
13
6.2k
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
130
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
1.8k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
610
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
180
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
210
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
Thoughts on Productivity
jonyablonski
76
5.2k
エンジニアに許された特別な時間の終わり
watany
107
250k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
How to Think Like a Performance Engineer
csswizardry
28
2.7k
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