1.1.0 • Published 7 years ago

jest-unique-reporter v1.1.0

Weekly downloads
4
License
Apache 2.0
Repository
github
Last release
7 years ago

jest-unique-reporter

A jest reporter that enforces unique test names. If duplicate test names are found then the test run will fail and tell you where the duplicates are.

Installation

yarn

yarn add --dev jest-unique-reporter

npm

npm install --dev jest-unique-reporter

Usage

Add to your jest configuration

{
  "reporters": [
    "<rootDir>/node_modules/jest-unique-reporter"
  ]
}

Configuration

jest-unique-reporter offers two configuration options.

fielddefaultdescription
globaldefault=falseif true then test names must be unique across all tests in the project. If false then test names must be unique per file.
useFullNamedefault=falseif true then describe blocks are included in the test names for comparison. If false then just "it" blocks are used for test names.

Example usage of configuration options

{
  "reporters": [
    ["<rootDir>/node_modules/jest-unique-reporter", {"global": false, "useFullName": false}]
  ]
}