0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

役割が大きなコンポーネントでReact Testing Libraryが上手く動いてないように見える時に見るメモ

Posted at

課題

大きなコンポーネントはHTMLの量が多いのでエラーが出た時に
該当の場所のHTMLまで出力されない。

やったこと

  1. コンポーネント側のデバッグしたい要素に data-hogeをつける
  2. html出力用のログを追加
  3. HTMLの出力の確認とテストの比較
setTimeout(() => {
  console.log(document.querySelector('[data-hoge]')?.outerHTML);
}, 3000);
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?