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
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
130
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
Cloudflare is Agents
chimame
0
150
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
450
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
260
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
540
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
370
その節約、円になってますか?
isamumumu
1
710
継続モナドとリアクティブプログラミング
yukikurage
3
700
5分で問診!Composer セキュリティ健康診断
codmoninc
0
910
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
220
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
300
源内ハンズオン概要編
hideg
0
140
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
870
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
6.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The agentic SEO stack - context over prompts
schlessera
0
860
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
420
Google's AI Overviews - The New Search
badams
0
1.1k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
66
57k
YesSQL, Process and Tooling at Scale
rocio
174
15k
First, design no harm
axbom
PRO
2
1.2k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
450
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
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