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.

Node.jsのテストフレームワーク比較 2021

Last updated at Posted at 2021-06-30

はじめに

Node.jsでアプリ開発をするにあたり、2021年現在で使用するのが良さそうなテストフレームワークについて調査しました。
2021/5/29時点での情報です。

テストフレームワーク比較表

調査したテストフレームワークは以下の3つです。
概要については、こちらの記事を参考にさせていただきました。
推奨は、調査結果から使うのが良さそうかどうか私が判断した項目です。

項目名 概要 npmダウンロード数 推奨 URL
Jest ・テストに必要な機能をほぼ全て網羅している
・テスト速度が速く、大規模プロジェクトのテストにおいても有効
9,847,324 https://jestjs.io/ja/
Mocha ・アサーション機能がないため、chaiなどのアサーションツールと併用する必要がある
・別のライブラリも使用するのでセットアップが少し難しい
・他のライブラリを選択できるという意味で柔軟性がある
4,237,700 https://mochajs.org/
Jasmine ・テストに必要な機能をほぼ全て網羅している 1,632,876 https://jasmine.github.io/

ダウンロード数比較グラフ

参考サイト
https://www.npmtrends.com/jest-vs-mocha-vs-jasmine
node_test_npmtrends.png

結論

最も使用されているJestを使うのが良さそうです。

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?