Socket
Book a DemoInstallSign in
Socket

@cucumber/pretty-formatter

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cucumber/pretty-formatter

pretty-formatter Writes a rich report of the scenario and example execution as it happens

latest
Source
npmnpm
Version
2.1.0
Version published
Weekly downloads
585K
4.05%
Maintainers
2
Weekly downloads
 
Created
Source


pretty-formatter

Writes a rich report of the scenario and example execution as it happens

Latest version on npm Build status

Example output of the pretty formatting, showing the different colors used

Usage

For usage in @cucumber/cucumber, see https://github.com/cucumber/cucumber-js/blob/main/docs/formatters.md#pretty

Options

  • attachments - whether to include attachments (defaults to true)
  • featuresAndRules - whether to include headings for Features and Rules (defaults to true)
  • theme - control over the styling of various elements (see below)

Themes

Here's the schema for a theme:

interface Theme {
    attachment?: Style
    dataTable?: {
        all?: Style
        border?: Style
        content?: Style
    }
    docString?: {
        all?: Style
        content?: Style
        delimiter?: Style
        mediaType?: Style
    }
    feature?: {
        all?: Style
        keyword?: Style
        name?: Style
    }
    location?: Style
    rule?: {
        all?: Style
        keyword?: Style
        name?: Style
    }
    scenario?: {
        all?: Style
        keyword?: Style
        name?: Style
    }
    status?: {
        all?: Partial<Record<TestStepResultStatus, Style>>
        icon?: Partial<Record<TestStepResultStatus, string>>
    }
    step?: {
        argument?: Style
        keyword?: Style
        text?: Style
    }
    tag?: Style
}

enum TestStepResultStatus {
    UNKNOWN = "UNKNOWN",
    PASSED = "PASSED",
    SKIPPED = "SKIPPED",
    PENDING = "PENDING",
    UNDEFINED = "UNDEFINED",
    AMBIGUOUS = "AMBIGUOUS",
    FAILED = "FAILED"
}

Style is any Node.js supported modifier or an array of them.

See the default theme for a good example. It's exported as CUCUMBER_THEME, so you can clone and extend it if you'd like.

FAQs

Package last updated on 17 Aug 2025

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.