1.1 なぜ Composition API への書き換えが必要なのか
1.2 クラスコンポーネントと Composition API の違い
1.3 Jest の基本はそのまま使える
2.1 クラスコンポーネントでのテストの特徴(wrapper.vm
依存)
2.2 Composition API でのテストの特徴(setup
からの返り値は template 内)
2.3 書き換えで変わる部分・変わらない部分まとめ
wrapper.vm
依存のテストを書き換える方法3.1 computed
の確認 → text()
や find()
に書き換える
3.2 data
の確認 → どう書き換えるべきか?
3.3 methods
の確認 → setup内の関数呼び出しとそのテスト
4.1 this.$store.dispatch
→ useStore().dispatch
への書き換え
4.2 Composition API での useStore
のモック方法