我无法得到答案,如何无法使用 jest 和 react-testing-library 达到功能组件内部的方法。
我尝试使用酶,但我看到一切都在改变为 RTL。
import React from "react";
const simpleComponents = (props) => {
const simpleMethod = () =>{
// method logic
};
return <h1>test</h1>;
};
}
export default simpleComponents;