■Y(やったこと)
・学習日報のサジェストタグのテスト追加
・UIの微調整
・リファクタリング
■W(わかったこと)
・https://github.com/ctimmerm/axios-mock-adapter のお作法
・flushPromisesの使い時
・Jestで特定のテストだけ実行する方法などいくつかのオプションなど
■T(次回やること)
・もう少し慣れたらチートシート用意する。
・↓の検討
■ひとこと
Jestに苦戦したものの、がっつり格闘したらなんとか書けるようになってきた。
非推奨のmethodsのモック化だけどうするか検討したい…。
特定のライフサイクルで処理が動いてるか?みたいなのどうやって書けばいいのさ。
> [vue-test-utils]: overwriting methods via the `methods` property is deprecated and will be removed in the next major version. There is no clear migration path for the `methods` property - Vue does not support arbitrarily replacement of methods, nor should VTU. To stub a complex method extract it from the component and test it in isolation. Otherwise, the suggestion is to rethink those tests.