Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Warning: The current testing environment is not configured to support act(...)

オープン
#1,336 コメント 8 件 リアクション 9 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript, react
領域
testing-qa

調査の方向性

Vitest、@testing-library/jest、jsdom 23.2.0 の下で @testing-library/react 16 による警告を再現し、その後 15.0.7 および記載されている @testing-library/dom の依存関係ツリーと比較してください。ソースファイルやテストは指定されていません。警告を除去し、テストが通る状態を維持する修正を特定して検証できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

After updating from v15 to v16 of testing-library/react, I'm now getting this error in all of my tests - except the tests still pass just fine.

Warning: The current testing environment is not configured to support act(...)

The error goes away when I downgrade to v15. Since @testing-library/dom is now a peer dep, I tried installing that as well but the error remains.

  • @testing-library/react version: 16
  • Testing Framework and version: vitest, @testing-library/jest
  • DOM Environment: jsdom 23.2.0, and I've tried upgrading this too. no change

With v15, here's what yarn why says (no warnings about act):

yarn why @testing-library/dom
├─ @storybook/testing-library@npm:0.1.0
│  └─ @testing-library/dom@npm:8.20.1 (via npm:^8.3.0)
│
├─ @testing-library/react@npm:15.0.7
│  └─ @testing-library/dom@npm:10.1.0 (via npm:^10.0.0)
│
└─ @testing-library/react@npm:15.0.7 [7cdc2]
   └─ @testing-library/dom@npm:10.1.0 (via npm:^10.0.0)

In 16 with dom added, here's what why says (warnings on act):

├─ @storybook/testing-library@npm:0.1.0
│  └─ @testing-library/dom@npm:8.20.1 (via npm:^8.3.0)
│
└─ tatsu@workspace:.
   └─ @testing-library/dom@npm:10.1.0 (via npm:^10.1.0)
主要言語
JavaScript
スター
19.7k
フォーク
1.2k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

testing-library/react-testing-library のほかの issue

testing-library/react-testing-library の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。