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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Luca Del Puppo
October 19, 2022
Programming
140
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
160
Aware dependencies using Nx Graph
puppo
0
99
Prisma the ORM that node was waiting for
puppo
0
140
How to scale up your projects like a pro
puppo
0
150
Alive, Tipi Sopravvisuti
puppo
0
150
How to scale up your angular projects like a pro
puppo
0
210
Prisma in the Air
puppo
0
480
Can typescript definitions survive even at runtime?
puppo
0
160
Is it possible to build your UI components using only web components?
puppo
0
120
Other Decks in Programming
See All in Programming
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
720
AWS Transform Customによる Spring Boot 2.xから4.xへのVerUp
satoshi256kbyte
2
100
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
7.8k
不幸な GC
chencmd
0
740
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.1k
170k Jobs a Day on GKE: Scaling Mercari's CI Platform - and What's Next for AI-Native Development
junyaokabe
0
120
AI Readyの正体はデータマネジメントだ メダリオン2.0の最前線
freee
PRO
0
390
仕様駆動開発の消費期限
watany
20
9k
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
150
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
400
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
180
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
380
Featured
See All Featured
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
Become a Pro
speakerdeck
PRO
31
6.2k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Being A Developer After 40
akosma
91
590k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Mobile First: as difficult as doing things right
swwweet
225
10k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
300
ラッコキーワード サービス紹介資料
rakko
1
4.5M
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