You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

jest-unique-reporter

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-unique-reporter

A jest reporter that enforces unique test names

1.1.0
latest
Source
npmnpm
Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

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}]
  ]
}

FAQs

Package last updated on 06 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts