Socket
Book a DemoInstallSign in
Socket

jest-md-dashboard

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-md-dashboard

Generating a pretty Markdown dashboard for Jest

0.8.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

jest-md-dashboard

npm version codecov test lint License: MIT

Generating a pretty Markdown dashboard for Jest

Table of Contents

Example

See https://github.com/tasshi-me/jest-md-dashboard/issues/20

Installation

npm

npm install -D jest-md-dashboard

yarn

yarn add -D jest-md-dashboard

pnpm

pnpm add -D jest-md-dashboard

Usage

Add reporters field in jest.config.js.

const config = {
  reporters: ["default", "jest-md-dashboard"],
};
module.exports = config;

Run jest and the dashboard is generated to test-dashboard.md.

With options

const config = {
  reporters: ["default", ["jest-md-dashboard", { title: "My Dashboard" }]],
};
module.exports = config;

Options

NameTypeDefaultDescription
titlestring"Test Dashboard"The title of a dashboard.
It will be printed at the top of the markdown output.
outputPathstringtest-dashboard.mdThe file path to output dashboard.
If you want to output to stdout, specify -.
permalinkBaseUrlstringundefinedOverride baseUrl of permalink.
See Permalink section for more information.

jest-md-dashboard generates permalink to test files on GitHub (or other services) by default.

It tries to find git information from the following sources.

  • permalinkBaseUrl option
  • (on GitHub Actions) environment variables
  • (in git repository) repository config

1. permalinkBaseUrl option

If permalinkBaseUrl is specified on jest config, jest-md-dashboard generates permalink using it.

Specify this option when if generated permalinks are incorrect.

The URL must have a trailing slash.

e.g. https://github.com/tasshi-me/jest-md-dashboard/blob/

2. Run on GitHub Actions

If jest runs on GitHub Actions, jest-md-dashboard refers to the the environment variables.

3. Run in git repository

If jest runs in a git repository, jest-md-dashboard refers to the local repository config.

Contribution

We appreciate your help!

License

Keywords

jest

FAQs

Package last updated on 26 Feb 2024

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.