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
Dive into vue-test-utils ~~Road of 1.0.0~~
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
pipopotamasu
June 24, 2019
Technology
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Dive into vue-test-utils ~~Road of 1.0.0~~
pipopotamasu
June 24, 2019
More Decks by pipopotamasu
See All by pipopotamasu
How JS Works
pipopotamasu
0
230
vue-function-tester
pipopotamasu
2
1.3k
medpacker_introduction_20190523
pipopotamasu
0
530
Introduction of medpacker: RoR Frontend Boilerplate
pipopotamasu
0
5k
新サービス・JOURNAL(ジャーナル)開発秘話
pipopotamasu
2
310
メドピアにおけるライブラリアップデート_MedBeer_20180912.pdf
pipopotamasu
0
12k
MedPeer_JapaxTaxi_MeetUp_Actioncable
pipopotamasu
0
720
MedPeer X みんなのウェディング合同勉強会
pipopotamasu
0
1.2k
UXBridge_vol3_pipopotamasu
pipopotamasu
2
930
Other Decks in Technology
See All in Technology
爆速でマルチプロダクトを立ち上げる時 事業・CTO目線で大事にしたい事
miyatakoji
0
100
JSAI2026 オーガナイズドセッションOS-27「不動産とAI」趣旨説明 / JSAI2026 Organized Session OS-27 “Real Estate and AI”: Statement of Purpose
ykiyota
0
230
Dario Amodi『Policy on the AI Exponential』を理解する
nagatsu
0
220
新しいVibe Codingと”自走”について
watany
5
290
Agentic Web
dynamis
1
200
機械学習を「社会実装」するということ 2026年夏版 / Social Implementation of Machine Learning June 2026 Version
moepy_stats
4
1.4k
SONiC Scale-Up Working Group から探る Scale-UpやUltraEthernet機能の実装方法
ebiken
PRO
0
110
失敗を資産に変えるClaude Code
shinyasaita
0
320
スキルと MCP ツール、責務をどう分けるか? AI が迷わないインターフェース設計の戦略
cdataj
1
950
小さくはじめるSLI/SLO ~育てながら組織に定着させる実践知~ / Starting Small with SLI/SLOs: Building Adoption Through Continuous Growth
nari_ex
4
1.7k
小さく始める AI 活用推進 ― 日経電子版 Web チームの事例/nikkei-tech-talk47
nikkei_engineer_recruiting
0
220
AAIFに入ってみた ~内から見えるコミュニティ動向~
sato4
0
160
Featured
See All Featured
First, design no harm
axbom
PRO
2
1.2k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
320
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
830
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
360
Designing for Timeless Needs
cassininazir
1
250
Believing is Seeing
oripsolob
1
140
Being A Developer After 40
akosma
91
590k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
580
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
360
Transcript
Dive into vue-test-utils ~~ Road of major 1.0.0 ~~ Yamato
Murakami (@pipopotamasu3) Vue.js Tokyo Drinkup#3 06/24/2019
name: Yamato Murakami, github: pipopotamasu, twitter: pipopotamasu3, company: MedPeer, Inc,
tech: [ Ruby, PHP, Vue.js, React ], hobby: Baseball
Do you know vue-test-utils?
So, what is medpacker? https://github.com/vuejs/vue-test-utils
So, what is medpacker? vue-test-utils is … vue-test-utils is the
“official” unit testing library for Vue.js
Have you used vue-test-utils?
None
None
None
None
None
Why has this been still beta?
Lets’s find out reasons!
https://github.com/vuejs/vue-test-utils/issues/246
https://github.com/vuejs/vue-test-utils/issues/246
2 blockers for ver1.0.0 *NQSPWFTVQQPSUGPSFYUFOEFEDPNQPOFOUT 'JYTZODISPOPVTCVHT
2 blockers for ver1.0.0 *NQSPWFTVQQPSUGPSFYUFOEFEDPNQPOFOUT 'JYTZODISPOPVTCVHT
Improve support for extended component
extended components?
extended components? // use Vue.extend const BaseComponent = Vue.extend({ data
() { return { lastname: 'murakami' } } }) new BaseComponent({ el: '#app', template: '<span>{{ firstname }}-{{ lastname }}</span>', data () { return { firstname: 'yamato' } } })
extended components? // use extends property const BaseComponent = {
data () { return { lastname: 'murakami' } } } new Vue({ extends: BaseComponent, el: '#app', template: '<span>{{ firstname }}-{{ lastname }}</span>', data () { return { firstname: 'yamato' } } });
Test Code
extended components? const BaseComponent = Vue.extend({ data () { return
{ lastname: 'murakami' } } }) const ChildCompoent = BaseComponent.extend({ template: '<span>{{ firstname }}-{{ lastname }}</span>', data () { return { firstname: 'yamato' } } }) describe("ChildCompoent.vue", () => { it("renders fullname", () => { const wrapper = mount(ChildCompoent); expect(wrapper.text()).toMatch('yamato-murakami'); }); });
extended components?
None
Why extended components need to improve?
None
None
None
// use Vue.extend const BaseComponent = Vue.extend({ data () {
return { lastname: 'murakami' } } })
// use Vue.extend const BaseComponent = Vue.extend({ data () {
return { lastname: 'murakami' } } }) !
None
// use Vue.extend const BaseComponent = Vue.extend({ data () {
return { lastname: 'murakami' } } }) BaseComponent.extend({ ~~~~~~~~~ some extend setting ~~~~~~~~~ })
// use Vue.extend const BaseComponent = Vue.extend({ data () {
return { lastname: 'murakami' } } }) BaseComponent.extend({ ~~~~~~~~~ some extend setting ~~~~~~~~~ }) "
None
https://github.com/vuejs/vue-test-utils/blob/dev/ packages/create-instance/create-instance.js#L76
None
https://github.com/vuejs/vue-test-utils/pull/1055
Why call `extend` twice?
Why call `extend` twice? const Component = { template: '<span></span>',
computed: { returnZero () { return 0; } } } describe("Component.vue", () => { it("override", () => { const wrapper = mount(Component, { computed: { returnZero () { return 'Override!!' } } }); expect(wrapper.vm.returnZero).toBe('Override!!'); }); });
5PJOKFDUDPNQPOFOUPQUJPOT MJLFADPNQVUFEAGSPNPVUTJEF
None
2 blockers for ver1.0.0 *NQSPWFTVQQPSUGPSFYUFOEFEDPNQPOFOUT 'JYTZODISPOPVTCVHT
2 blockers for ver1.0.0 *NQSPWFTVQQPSUGPSFYUFOEFEDPNQPOFOUT 'JYTZODISPOPVTCVHT
None
Thank you for listening!
References • https://github.com/vuejs/vue-test-utils • https://jp.vuejs.org • https://github.com/vuejs/vue
Reference Images • http://hermie.jp/ • Yoshiki HAYAMA hermie.jp • CC
BY 3.0 • https://creativecommons.org/licenses/by/ 3.0/deed.ja