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
頑張りすぎないVue.js単体テストのススメ / Vue.js unit testing th...
Search
Kosuke Yamashita
October 24, 2019
Programming
1
500
頑張りすぎないVue.js単体テストのススメ / Vue.js unit testing that does not work too hard
2019/10/24 STORES.jp Meetup for Front-end Engineers #1で発表した内容です。
Kosuke Yamashita
October 24, 2019
Tweet
Share
More Decks by Kosuke Yamashita
See All by Kosuke Yamashita
STORESにおけるアクセシビリティ向上の取り組み
kskymst
0
39
事業成長を加速させるフロントエンド改善のお話
kskymst
7
5.7k
Other Decks in Programming
See All in Programming
watsonx.ai Dojo #2 生成AIを使ったアプリ開発入門編
oniak3ibm
PRO
0
190
2024 컴포즈 정원사
jisungbin
0
150
ECMAScript、Web標準の型はどう管理されているか / How ECMAScript and Web standards types are maintained
petamoriken
3
390
今インフラ技術をイチから学び直すなら
yuhta28
1
140
GraphQL あるいは React における自律的なデータ取得について
quramy
11
3k
Modular Monolith Go Server with GraphQL Federation + gRPC
110y
1
580
rails_girls_is_my_gate_to_join_the_ruby_commuinty
maimux2x
0
200
Google Sign-inの移行から始めるCredential Manager活用
clockvoid
0
310
あなたのアプリ、ログはでてますか?あるいはログをだしてますか? (Funabashi.dev用 軽量版)
uzulla
2
120
Architecture Decision Record (ADR)
nearme_tech
PRO
1
690
エンジニア1年目で複雑なコードの改善に取り組んだ話
mtnmr
3
2k
API Platform for Laravel
dunglas
1
400
Featured
See All Featured
Happy Clients
brianwarren
96
6.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
48
2.8k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
109
6.9k
No one is an island. Learnings from fostering a developers community.
thoeni
18
2.9k
The Cost Of JavaScript in 2023
addyosmani
42
5.7k
Done Done
chrislema
180
16k
Embracing the Ebb and Flow
colly
83
4.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
663
120k
Making Projects Easy
brettharned
113
5.8k
Making the Leap to Tech Lead
cromwellryan
128
8.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
363
22k
Debugging Ruby Performance
tmm1
72
12k
Transcript
,PTVLF:BNBTIJUB 4503&4KQ JODIFZ JOD 4503&4KQ.FFUVQGPS'SPOUFOE&OHJOFFST ؤுΓ͗͢ͳ͍7VFKT୯ମςετͷεεϝ
ࣗݾհ ɾࢁԼޭհ ɾ4503&4KQ6*վળνʔϜ ɾ݄ೖࣾ ɾલ৬ϕτφϜͷελʔτΞοϓ ɹͰ3FBDUϝΠϯ !LTLZNTU
୯ମςετॻ͍ͯ·͔͢ʁ
ετΞσβΠϯ ϦϒϥϯσΟϯά ՝ۚϖʔδ ૿੫ରԠ ׂൢ๏ରԠ 6*$PNQPOFOU ΞΠςϜ࡞ฤू ݄ ݱࡏ
5FTUJOH4UBSU Ҡߦ։࢝ ˞1+Ұ෦ൈਮ
֤ݸਓؤுͬͯਐΊ͍͕ͯͨɻɻ ςετํΛܾΊͯޮՌతͳςετΛ ؤுΓ͗ͣ͢ॻ͖͍ͨ ςετཻͷෆἧ͍ͭɺޮՌతͰͳ͍ςετ ɾϦιʔεͷফ ɾϝϯςφϯείετ ɾεϓϦϯτ௨Γʹਐ·ͳ͍JTTVF ɾਫ਼ਆతͳਏΈ ! "
ͦ͜Ͱࠓ4503&4͕ςετͱ ͖߹ͬͨ݁Ռʹ͍͓ͭͯ͠·͢
˞ิ
4503&4KQͰओʹͭͷϦϙδτϦͰ /VYUº+FTUΛத৺ʹςετڥΛߏங .BJO 6*$PNQPOFOU-JCSBSZ
/VYU WVFUFTUVUJMT º+FTUͰͷ͓͕ϝΠϯ .BJO 6*$PNQPOFOU-JCSBSZ
"HFOEB తΛܾΊΔʢXIZʣ ςετରΛܾΊΔʢXIBUʣ Ͳ͏ςετ͢Δͷ͔ IPX ͜Ε͔Β
"HFOEB తΛܾΊΔʢXIZʣ ςετରΛܾΊΔʢXIBUʣ Ͳ͏ςετ͢Δͷ͔ IPX ͜Ε͔Β
ςετΛॻ͘త ɾਫ਼ਆత҆ఆ ɾखಈςετͷίετͷݮ ɾϦϑΝΫλϦϯά࣌ͷΤϯόάΛݮΒ͢ ɾίϯϙʔωϯτͷ༷ॻతׂ
"HFOEB తΛܾΊΔʢXIZʣ ςετରΛܾΊΔʢXIBUʣ Ͳ͏ςετ͢Δͷ͔ IPX ͜Ε͔Β
ςετର ɾQBHFT ⚪1$ ⚪41 ɾDPNQPOFOUT ⚪NJYJO ⚪DPOUBJOFS ⚪QSFTFOUBUJPOBM ɾMBZPVUT ɾTUPSF
ɾVUJMT ɾDPOTUBOUT ɾQMVHJOT ɾNJEEMFXBSF
ςετ༰ ɾNPVOU ɾQSPQT ɾDPNQVUFE ɾNFUIPET ⚪FNJU ⚪IUUQ3FRVFTU ɾUFNQMBUF ⚪TMPU ⚪WJGWTIPX
⚪WPO ⚪WCJOEDMBTT ⚪WCJOEBUUS ɾMJGFDZDMF ɾNJYJO ɾBTZOD%BUBGFUDI ɾHFUUFST ɾNVUBUJPOT ɾBDUJPOT
ൣғ͍ !
ޮՌతɺޮՌͷബ͍ςετΛఆٛͯ͠ ॻ͘ɺॻ͔ͳ͍Λ໌֬ʹ͢Δ !
ޮՌͷബ͍ςετ ɾॳظදࣔঢ়ଶ ɾQSPQTͷఆٛ ɾ୯७ͳϩδοΫ FUD ෳࡶͷ͍ϩδοΫ ॻ͔ͳ͍બΛͨ͠ !
ॳظදࣔঢ়ଶ QSPQTͷUFNQMBUFදࣔͷΈ
QSPQTͷఆٛ QSPQTఆٛʹରͯ͠ͷςετ
୯७ͳϩδοΫFYNVUBUJPOT ୯७ͳTUBUFมߋͷNVUBUJPO ͦͷଞFNJUΛൃՐ͢Δ͚ͩͷNFUIPETͳͲ
ޮՌతͳςετ ɾυϝΠϯͰͷίΞͳϩδοΫ ɾذͷೖΔϩδοΫ ෳࡶͷߴ͍ϩδοΫ ͔ͬ͠Γͱ͑Δ !
υϝΠϯͰͷίΞͳ߲Λఆٛ͢Δ
ྫ͑͜͏͍ͬͨ ༗ྉձһొϑΥʔϜͷ߹ ίΞͳςετ߲Λఆٛ
༗ྉձһొϑΥʔϜ ͷ߹ ᶃ ᶄ ᶆ ᶅ ᶄֹ͕ۚਖ਼͘͠දࣔ͞Ε͍ͯΔࣄ ᶃʮ͓ࢧํ๏ʯʹΑͬͯ ϑΥʔϜ༰͕มΘΔࣄ ᶅόϦσʔγϣϯ͕ਖ਼͘͠ಈ࡞ɺ
දࣔ͞ΕΔࣄ ᶆϑΥʔϜͷೖྗ༰Ͱ"1*͕ ୟ͔ΕΔࣄ
ذͷೖΔϩδοΫ ಛఆ݅ɺΠϕϯτʹΑͬͯڍಈ͕ มΘΓόάʹͳΓ͍͢
"HFOEB తΛܾΊΔʢXIZʣ ςετରΛܾΊΔʢXIBUʣ Ͳ͏ςετ͢Δͷ͔ IPX ͜Ε͔Β
Ͳ͏ςετ͢Δͷ͔ ɾQBHFTͰͷ౷߹ςετ ɾTUPSFGBDUPSZؔͰڞ௨Խ ʜFUD ಉΫϥεςετɺڥքςετͷΑ͏ͳςετٕ๏ ͪΖΜͰ͕͢ɺͬͱ7VFº+FTUଆͷ
QBHFTͰͷ౷߹ςετ QBHFT͔ΒNPVOUͰ౷߹ςετ σʔλͷྲྀΕΛ͔ͬ͠Γ௨͍ͬͯΔ͔νΣοΫ ˞ଞίϯϙʔωϯτجຊతʹTIBMMPX.PVOUͰΛด͡ࠐΊΔ 1BSFOU $IJME (SBOEDIJME mount
ͦͷࡍXBSOJOHͰGBJMʹ͢Δ jestSetup.js XBSOJOH͕ग़͘͢ɺग़ͯςετࣗମ௨ͬͯ͠·͏ҝ XBSOJOHͰGBJM͢Δ༷ʹ͓ͯ͘͠ͱΑΓָͰ҆৺ jest.config.js
TUPSFGBDUPSZؔͰڞ௨Խ ڞ௨Խ͢Δ͜ͱͰେ෯ʹָʹ
͜ͷଞʹ·ͩ·ͩ͋Δ !EFYJB͕ࣾ2JJUBʹ߲ͷ σβΠϯύλʔϯɺΞϯνύλʔϯ Λ·ͱΊͯ͘Ε͍ͯΔ ࣮࣌ͷ໎͍͕ফ͑ϨϏϡϫʔ ͱڞ௨ݴޠͰձͰ͖ΔΑ͏ʹ ͳΔ ৄ͍͠༰·ͨͲ͔͜ͰͤͨΒ !
"HFOEB తΛܾΊΔʢXIZʣ ςετରΛܾΊΔʢXIBUʣ Ͳ͏ςετ͢Δͷ͔ IPX ͜Ε͔Β
͜Ε͔Β WJGͳͲͷදࣔذʹؔͯ͠&&ಋೖͳͲ ࢼͯ͠Έ͍ͨɺྑͦ͞͏Ͱ͋Ε୯ମςετ ͷ༰Λ&&دͤΒΕΔͷͰͳ͍͔ʁ ͳΜͯΛ͍ͯ͠·͢
ؤுΓ͗ͣ͢ϝϯς͍͢͠ ςετΛ͜Ε͔Βࢦ͍ͯ͘͠ !
None
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ !
IUUQTIFZKQFWFOUTIFMMPIFZ ୈೋɾୈ࢛༵ʙ