岩岩接觸 Vitest 由於我唔係好熟 TypeScript 但係 Vitest 既 tutorial 同 documentation 多數係用 TypeScript 所以唔知個 vitest.config.js 應該係有 D 咩… 所以就係呢度 share 我個 initial config vitest.config.js import react from "@vitejs/plugin-react"; import { defineConfig } from "vitest/config"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], test: { environment: "jsdom", coverage: { provider: "istanbul", // or 'c8' reporter: ["text", "json", "html"], reportsDirectory: "./coverage", }, }, }); Hope you find it useful
2023-03-02
終於有時間玩返D 自己想玩既野 好耐之前自己用 nodejs express 整左個 project 用 Jest 做 Unit Test 之後 upload 個 report 去 Codecov{:target="_blank"} 放便睇返個coverage report 最近想幫岩岩起既 NextJs project 做 Unit Test 同 upload report 去 Codecov 發現佢 recommend 用 GitHub Action 或其他 build 既 pipeline 去 upload report … 對我呢D 資源比較短缺既 dev 用 GitHub Action 會用到 Build 既minutes 所以可以local upload report 會比較化算 但係唔係好清楚要點做…
2023-03-01