我的應用程式是使用 create react app 和 npm 制作的。在 jest 的官方檔案https://jestjs.io/docs/tutorial-react 中,他們只有關于使用 yarn 測驗 CRA 應用程式的資訊。這是否意味著我們不能使用 jest 使用 npm 來測驗我們的 React 應用程式?
uj5u.com熱心網友回復:
你可以在 CRA 中使用 jest,事實上它已經內置在 CRA 中。
嘗試運行 npm test
在此處閱讀更多詳細資訊https://create-react-app.dev/docs/running-tests
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/372013.html
標籤:javascript 反应 测试 新产品经理 玩笑
