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
120
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
93
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
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
210
AI 輔助遺留系統現代化的經驗分享
jame2408
1
760
Oxcを導入して開発体験が向上した話
yug1224
4
320
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.3k
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
260
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
170
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
190
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
13k
Inside Stream API
skrb
1
740
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
140
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
150
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
540
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
840
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
170
Java REST API Framework Comparison - PWX 2021
mraible
34
9.4k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
390
GraphQLとの向き合い方2022年版
quramy
50
15k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
210
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
480
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Navigating Weather and Climate Data
rabernat
0
220
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
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