# TypeScriptでクラスの基礎とモックについて学ぼう【JISOU】 補足テキスト 実際に使ったタスクリスト https://hackmd.io/RhRdHDe2R32idfzsuveyDQ テストの環境構築 https://hackmd.io/QwhWv9CNT_6Zzj6IO0MUuQ ViteのProcess.envの設定 https://qiita.com/shunii/items/b00d556f3730e6b88708 サンプルリポジトリ https://github.com/jinwatanabe/ex-type-basic-1 ``` npm i @chakra-ui/react @emotion/react @emotion/styled framer-motion npm install @supabase/supabase-js npm i vite-plugin-env-compatible ``` ``` function formatDate(dateString: string): string { const date = new Date(dateString); const year = date.getFullYear(); // getMonth() は0から始まるため、1を足す const month = (date.getMonth() + 1).toString().padStart(2, '0'); const day = date.getDate().toString().padStart(2, '0'); return `${year}/${month}/${day}`; } ``` ``` npm i --save-dev jest npm i --save-dev @types/jest npm i --save-dev ts-jest npm i --save-dev @testing-library/react npm i --save-dev @testing-library/jest-dom npm i --save-dev jest-environment-jsdom npm i --save-dev @testing-library/user-event ```