タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

JavaScriptとJestとtestingに関するjay-esのブックマーク (2)

  • Why Is My Jest Suite So Slow?

    Our team is a couple of months into developing a new application, and our suite of unit 240 tests takes 46 seconds to run. That duration is not excessive yet, but it’s increasing in proportion to the number of tests. In a couple of months, it’ll take a couple of minutes to run our tests. We were surprised by this, as Jest is known for its fast performance. However, while Jest reported that each te

    Why Is My Jest Suite So Slow?
    jay-es
    jay-es 2023/01/21
    Jest のパフォーマンス改善。`node --inspect-brk` を使用してボトルネックを探る。巨大なライブラリは必要なファイルだけインポートする。TS の型チェックを省く
  • Make Your Jest Tests up to 20% Faster by Changing a Single Setting

    TL;DR When you have Jest as your test runner, passing the --maxWorkers=50% option will make the tests faster in most cases. For watch mode, use --maxWorkers=25%, and for CI disable Jest workers with --runInBand. You can experiment with the percentage and fine-tune for your particular setup. // package.json { "scripts": { // standalone Jest "test": "jest --maxWorkers=50%", "test:watch": "jest --wat

    jay-es
    jay-es 2021/04/03
    Jest 高速化 Tip。--maxWorkers=50% オプションを追加する。watch では25%にしたり、計測してベストな値を探す。CI の時は --runInBand をつけて worker を無効化するのがいいらしい
  • 1