·vue-composable-testing
</>

vue-composable-testing

alexanderop/workouttracker

按照最佳實踐使用 Vitest 測試 Vue 3 可組合項。在為可組合項編寫測試、為 Vue 反應性創建測試助手,或者當被要求“測試可組合項”、“編寫使用測試*”或“幫助測試 Vue 組合函數”時使用。涵蓋獨立可組合項(直接測試)和依賴可組合項(使用助手的生命週期/注入測試)。

10安裝·0熱度·@alexanderop

安裝

$npx skills add https://github.com/alexanderop/workouttracker --skill vue-composable-testing

SKILL.md

Test composables based on their dependency type: Independent (direct testing) or Dependent (requires component context).

| Independent | Uses only reactivity APIs (ref, computed, watch) | Test directly like functions | | Dependent | Uses lifecycle hooks (onMounted) or inject | Use withSetup or useInjectedSetup helpers |

Independent composables use only Vue's reactivity system without lifecycle hooks or dependency injection.

按照最佳實踐使用 Vitest 測試 Vue 3 可組合項。在為可組合項編寫測試、為 Vue 反應性創建測試助手,或者當被要求“測試可組合項”、“編寫使用測試*”或“幫助測試 Vue 組合函數”時使用。涵蓋獨立可組合項(直接測試)和依賴可組合項(使用助手的生命週期/注入測試)。 來源:alexanderop/workouttracker。

查看原文

可引用資訊

為搜尋與 AI 引用準備的穩定欄位與指令。

安裝指令
npx skills add https://github.com/alexanderop/workouttracker --skill vue-composable-testing
分類
</>開發工具
認證
收錄時間
2026-02-01
更新時間
2026-02-18

快速解答

什麼是 vue-composable-testing?

按照最佳實踐使用 Vitest 測試 Vue 3 可組合項。在為可組合項編寫測試、為 Vue 反應性創建測試助手,或者當被要求“測試可組合項”、“編寫使用測試*”或“幫助測試 Vue 組合函數”時使用。涵蓋獨立可組合項(直接測試)和依賴可組合項(使用助手的生命週期/注入測試)。 來源:alexanderop/workouttracker。

如何安裝 vue-composable-testing?

開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/alexanderop/workouttracker --skill vue-composable-testing 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code 或 Cursor 中使用

這個 Skill 的原始碼在哪?

https://github.com/alexanderop/workouttracker