Mastra Blog·· 2 小時前AI 評分54
Mastra 為實驗流程加入 Lifecycle Hooks
Introducing Experiment Lifecycle Hooks
AI 導讀
Mastra 為實驗執行流程加入生命週期 hooks,讓用戶可在不同階段設定測試環境,並於流程完成後清理。支援 `beforeAll`、`beforeEach`、`afterEach`、`afterAll`,需使用 @mastra/core@1.60.0 或更新版本。示例會在實驗開始時建立 Neon branch、每個測試案例前寫入種子資料、之後重置資料庫,並在結束時刪除 branch。
來源:Mastra Blog · mastra.ai