jest-detective
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Jest Detective

detective

Jest extension for investigating and fixing flaky tests

Identify flakiness.
Investigate the root cause.
Improve confidence in your tests and application.


Build Status version MIT License semantic-release PRs Welcome

Motivation

Flaky tests are a unfortunate reality of e2e and integration tests. Tests can become flaky for large variety of reasons. Just to name a few:

  • Race-conditions
  • Test timeouts
  • Test interdependencies
  • Network timeouts

While there are ways to improve the reliability of test suites, such as retrying failing test, there are not many tools to help fix flaky tests. Jest Detective provides tools to better understand flaky test suites:

  • Test reliability metrics
  • Built-in CPU throttling of tests to investigate race-conditions and timeouts
  • Test stack trace analysis to identify the differences between a pass and fail

Table of Contents

Installation

npm install --save-dev jest-detective

jest is a peer-dependency of Jest Detective so you must also have jest installed if it is not already:

npm install --save-dev jest

Test

To run tests use the test script:

npm run test

LICENSE

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i jest-detective

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

7.94 kB

Total Files

8

Last publish

Collaborators

  • olivierwilkinson