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
Rethinking Testing for React Applications
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Tommy Graves
March 20, 2019
Programming
0
50
Rethinking Testing for React Applications
Tommy Graves
March 20, 2019
Tweet
Share
More Decks by Tommy Graves
See All by Tommy Graves
Building a Production-Ready React Native App
tagraves
1
140
Fiber or Glimmer?
tagraves
0
25
Learning to Learn From Disagreement
tagraves
0
98
Other Decks in Programming
See All in Programming
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
3
920
Understanding Apache Lucene - More than just full-text search
spinscale
0
130
Windows on Ryzen and I
seosoft
0
320
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
520
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
150
CSC307 Lecture 14
javiergs
PRO
0
480
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
420
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
140
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
310
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
500
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
610
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Designing for Performance
lara
611
70k
Are puppies a ranking factor?
jonoalderson
1
3.1k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
200
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
230
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
380
Design in an AI World
tapps
0
170
Embracing the Ebb and Flow
colly
88
5k
WCS-LA-2024
lcolladotor
0
480
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
RailsConf 2023
tenderlove
30
1.4k
Transcript
Rethinking Testing for React Applications
Tommy Graves Lead Software Engineer, New Channels !2 Twitter: @TAGraves
Email:
[email protected]
• High level discussion of what testing is for •
Three antipatterns that tests can fall into • The big reveal: a testing pattern that avoids those antipatterns !3 A quick overview
• To prevent defects in new code • To ensure
changes don't break existing functionality • To document the intention of the authors of a section of code • To drive the implementation of code? !4 Why do we test?
!5 Testing is about confidence!
What leads to confidence? !6
What leads to confidence? !7
Antipattern #1: Testing implementation details instead of behavior !8
Can the tests fail, but the code work? !9
The hooks rule !10
Antipattern #2: Testing the code instead of the application !11
Can the tests pass, but the code not work? !12
The machine- generated rule !13
Antipattern #3: Testing in isolation (for isolation's sake) !14
Do your tests care about how things really work? !15
!16 The testing pyramid Unit Tests: • Fast • Deterministic
• Easy to write • Easy to diagnose • Isolated confidence Integration Tests: • Slow • Flaky • Hard to write • Hard to diagnose • Overall confidence
!17 Mocks are trade-offs Mocks make tests: • Faster •
More deterministic • Easier to write • Easier to diagnose • Less confidence-giving
!18 Testing is about confidence!
!19 Rethinking Integration Integration tests can be • Fast •
Deterministic • Easy to write
The TDD rule !20
!21 • Testing implementation details instead of behavior • Testing
the code instead of the application • Testing in isolation (for isolation's sake) The three antipatterns
!22 React Testing Library
What leads to confidence? !23
Testing from the user's perspective !24
!25 Test-Driven UI Development
!26
Confidential – for internal use only !27
Thank you!
[email protected]