Scraps 最終更新 2026/11/06 17:01

原文著者: @ryu0947 /

【テスト】TestingLibraryElementError: Found multiple elements with the textに沼った

AIで作成し、掲載基準に基づいて自動選定した要約です。

  • TestingLibraryElementError: Found multiple elements with the textエラーが発生した
  • findByTextで検索した要素が複数存在し、Supabaseへの接続がテスト中に実行されていた
  • テスト中に外部APIに接続すると意図しない副作用が発生するため、モックを設定する必要がある
【テスト】TestingLibraryElementError: Found multiple elements with the textに沼った - Qiita

Qiita / 原文を読む