Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ng-mocksを活用したユニットテストのご紹介
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Yusuke Oba
September 22, 2021
Programming
450
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ng-mocksを活用したユニットテストのご紹介
ng-japan OnAir vol.46 「Angularのテストを語る」で発表したLTセッションの資料です。
Yusuke Oba
September 22, 2021
Other Decks in Programming
See All in Programming
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.7k
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
170
The Rails Doctrine Decade
koic
2
590
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
1
440
Agents on Rails - Rails at Scale 2026
irinanazarova
0
570
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.5k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
220
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
3.9k
ジョジョの世界をXRで再現する
mofurune
0
170
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
4 Signs Your Business is Dying
shpigford
187
23k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
Tell your own story through comics
letsgokoyo
1
1.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Discover your Explorer Soul
emna__ayadi
2
1.3k
Product Roadmaps are Hard
iamctodd
55
13k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Transcript
ng-japan OnAir LT Session
Angular͖ͳWebΞϓϦέʔγϣϯΤϯδχΞͰ͢ ࣗࣾͰӡӦ͢ΔϏϡʔΞʔΞϓϦέʔγϣϯͷςοΫϦʔ υΛ୲͍ͯ͠·͢ɻ Senior Software Engineer yusuke-oba1 About Me େ༔հ
Yusuke OBA
4BGJFͬͯԿʁ
ΫϥυըαʔϏε גࣜձࣾςΫϊɾγεςϜɾϦαʔνʮωοτϫʔΫΧϝϥͷΫϥυըαʔϏεࢢௐࠪʯ ωοτϫʔΫΧϝϥͷө૾ΛΫϥυʹ อଘɻ ͍ͭͰ͖ͳ࣌ʹϥΠϒըө૾Λ ݟΒΕ·͢ɻ ۀɻ ಉ༷ͷαʔϏεͱͯ͠ɺ
ࠃγΣΞ/P✨
ng-mocksΛ׆༻ͨ͠Ϣχοτςετͷ͝հ
ͳͥςετΛॻ͘ͷ͔
ͳͥςετΛॻ͘ͷ͔ ɾσάϨΛ͙ ɾϩδοΫͷมߋɺϥΠϒϥϦͷมߋʹڧ͘ͳΔ ɾΑΓγϯϓϧͳ࣮ʹͳΔ
ςετͷΈ
ςετͷΈ ɾϞοΫΛ࡞͢Δͷ͕खؒ ɾ࣮͕มΘΔͱϞοΫΛվम͢Δඞཁ͕͋Δ
OHNPDLT.PDL1SPWJEFS IUUQTOHNPDLTTVEPFVBQJ.PDL1SPWJEFS ϞοΫΛಈతʹ࡞͢Δ
࣮ྫͷ͝հ
؆୯ͳαϯϓϧͰ͝հ ςΩετϘοΫε ߋ৽Ϙλϯ
ؔ࿈ਤ Component Component Store Service 6*Λఆٛ ঢ়ଶཧɾߋ৽ "1*αʔϏε
σΟϨΫτϦߏ Service Component Store Component
αʔϏεͷ࣮
αʔϏεͷ࣮ "1*ͰΛߋ৽ ⁞ ⁞"1*ͰΛऔಘ
ComponentStoreͷ࣮ͱςετ
$PNQPOFOU4UPSFͷ࣮ ⁞ ⁞ঢ়ଶͱͯ͠WBMVFΛఆٛ αʔϏε͔ΒΛऔಘͯ͠WBMVFͷঢ়ଶΛॳظԽ WBMVFͷঢ়ଶΛߋ৽ αʔϏεͷVQEBUF7BMVFϝιουΛݺͼग़͢
$PNQPOFOU4UPSFͷςετ࣮ ⁞ ⁞OHNPDLTͷ.PDL1SPWJEFSͰαʔϏεΛϞοΫ 5FTU#FEJOKFDUͰϞοΫΠϯελϯε͕ฦΔ TQZ0OͰϝιουͷॲཧΛ্ॻ͖ ঢ়ଶ͕ظʹߋ৽͞Ε͍ͯΔ͔Λςετ
ετΞͷঢ়ଶΛߋ৽ TQZ0OͰϝιουͷॲཧΛ্ॻ͖ ظ͢ΔϝιουɾҾ͕ݺΕ͍ͯΔ͔Λςετ
Componentͷ࣮ͱςετ
HTML Template Component $PNQPOFOUͷ࣮ ⁞ ⁞$PNQPOFOU4UPSFΛQSPWJEFSTʹՃ $PNQPOFOU4UPSFΛ%*Ͱೖ WBMVFมʹετΞͷWBMVFΛೖ
˞QVTIQJQFBTZODQJQFͷΧελϚΠζ ςΩετϘοΫεʹWBMVFΛόΠϯσΟϯά ˞TGUFYUCPYಠࣗίϯτϩʔϧ ϘλϯʹVQEBUFϝιουΛόΠϯσΟϯά ˞TGCVUUPOಠࣗίϯτϩʔϧ
$PNQPOFOUͷςετ࣮ ⁞ ⁞.PDL1SPWJEFSͰ$PNQPOFOU4UPSFΛϞοΫ ɹWBMVFΛ#FIBWJPS4VCKFDUʹஔ͖͑ WBMVFͷΛߋ৽ ˞.PDL4UPSF7BMVFʹ͍ͭͯޙड़ ςΩετϘοΫεͷΛςετ ˞GJOE&MFNFOUT#Z/BNFʹ͍ͭͯޙड़
ίϯτϩʔϧͷϔϧύʔΛ࡞ ˞ಠࣗίϯτϩʔϧΛςετͰ੍ޚ͢ΔͨΊͷϔϧύʔΫϥε 6QEBUFϘλϯΛΫϦοΫͯ͠VQEBUFϝιου ͕ݺΕ͍ͯΔ͔Λςετ
ศརؔͷհ #FIBWJPS4VCKFDUͷΛߋ৽͢Δ )5.-ཁૉͷOBNFଐੑ͔ΒλʔήοτͷཁૉΛ୳ࡧ͢Δ
·ͱΊ ɾϞοΫͷ࡞ίετΛݮ͢Δ͚ͩͰ͍ͩͿָʹͳΔ ɾཁૉOBNFଐੑΛ༩࣮ͯ֬͠ʹऔΕΔΑ͏ʹ͢Δ ɾϔϧύʔΫϥεͰίϯτϩʔϧΛૢ࡞Ͱ͖ΔΑ͏ʹ͢Δͱศར ɾςετॻ͖ա͗ͳ͍
ө૾͔ΒະདྷΛͭ͘Δ