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
140
Aware dependencies using Nx Graph
puppo
0
84
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
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
130
Is it possible to build your UI components using only web components?
puppo
0
93
Other Decks in Programming
See All in Programming
AI & Enginnering
codelynx
0
140
kintone + ローカルLLM = ?
akit37
0
110
Event Storming
hschwentner
3
1.3k
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1.1k
あなたはユーザーではない #PdENight
kajitack
4
210
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
380
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
PRO
0
180
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
180
Package Management Learnings from Homebrew
mikemcquaid
0
270
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
200
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
2
170
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
1
350
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
160
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Designing for Performance
lara
611
70k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
220
The SEO Collaboration Effect
kristinabergwall1
0
370
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
650
SEO for Brand Visibility & Recognition
aleyda
0
4.3k
Accessibility Awareness
sabderemane
0
68
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
420
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