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?

More than 3 years have passed since last update.

jest.setup.jsを作成してルートディレクトリに置いたら赤線が出てしまうのを修正する方法

Last updated at Posted at 2020-10-27

やりたかったこと

jestでのテストにて、テストケースのたびにわりと負荷のかかることをしているので、
デフォルトの設定だとタイムアウトしてしまうので、その設定を追加したかった。

jest.setup.js
jest.setTimeout(30000);
})

解決方法

jestを実行時の環境変数の設定や今回のようなタイムアウトの設定などは、
「.jest」って名前でディレクトリを作ってその中に入れる必要がある。
もし入れないで実行しようとしたら、「setupFiles option was not found」となる。

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?