import React from 'react'; import { render, fireEvent, screen } from '@testing-library/react'; import { perf, wait } from 'react-performance-testing'; test('countボタンをクリックした時に、2回レンダリングする', async () => { const Button = ({ name, onClick }) => ( <button type="button" onClick={onClick}>{name}</button> ); const Counter = () => { const [count, setCount] = React.useState(0); return ( <div> <span>{count}</