ちなみにですが、GitHub に記述されているrender(ui, { legacyRoot: true } )の部分を検証しました。 React v18、react-testing-library v13 にしました。 To opt-out of this change you can use render(ui, { legacyRoot: true } ). But be aware that the legacy root API is deprecated in React 18 and its usage will trigger console warnings. この変更をオプトアウトするには、render(ui, { legacyRoot: true } ) を使用します。ただし、React 18 ではレガシー ルート API は非推奨であり、使用するとコンソールの警告が