我可以\xc2\xb4t得到答案,如何无法使用jest和react-testing-library进行反应来到达功能组件内部的方法。
\n\n我尝试使用酶,但我发现一切都变成了 RTL。
\n\nimport React from "react";\n\nconst simpleComponents = (props) => {\n\n const simpleMethod = () =>{ \n // method logic\n };\n\n return <h1>test</h1>;\n };\n}\n\nexport default simpleComponents;\nRun Code Online (Sandbox Code Playgroud)\n