nekochans / lgtm-cat-frontend

lgtm-cat(サービス名 LGTMeow https://lgtmeow.com) のフロントエンド用
https://lgtmeow.com
21 stars 2 forks source link

MSWのバージョンを2系に更新 & テストフレームワークをVitestに変更 #279

Closed keitakn closed 6 months ago

keitakn commented 6 months ago

issueURL

https://github.com/nekochans/lgtm-cat-frontend/issues/264

https://github.com/nekochans/lgtm-cat-frontend/issues/278

関連 URL

https://lgtm-cat-frontend-git-feature-issue264upgrade-msw-nekochans.vercel.app/

このPRで対応すること / このPRで対応しないこと

以下の2つの完了の定義を満たす為にテストフレームワークをVitestに移行しMSWのバージョンを2系に更新する。

https://github.com/nekochans/lgtm-cat-frontend/issues/264

https://github.com/nekochans/lgtm-cat-frontend/issues/278

Storybook の URL もしくはスクリーンショット

https://622b6c5dc31e9e003a111eb5-casprwcqss.chromatic.com/

変更点概要

タイトルの通り、当初は別々に進める予定だったが、MSWのバージョンを2系がJestと相性が悪く、両方一緒に対応したほうが効率が良いと判断して両方一緒に実施した。

かなり変更点は多いが、MSWのほうは https://mswjs.io/docs/migrations/1.x-to-2.x/ の内容に従って変更しているのみ。

Jest → Vitestの移行に関しては https://github.com/nekochans/ai-cat-frontend/pull/78 と同様の修正をこちらのPRでも実施している。

レビュアーに重点的にチェックして欲しい点

特になし

補足情報

特になし

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lgtm-cat-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 10, 2024 1:31pm
codecov[bot] commented 6 months ago

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (7b773a4) 73.75% compared to head (215d760) 60.35%.

Files Patch % Lines
src/mocks/api/error/mockUnauthorizedError.ts 33.33% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #279 +/- ## =========================================== - Coverage 73.75% 60.35% -13.41% =========================================== Files 47 92 +45 Lines 423 3032 +2609 Branches 104 155 +51 =========================================== + Hits 312 1830 +1518 - Misses 107 1157 +1050 - Partials 4 45 +41 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.