Generating a pretty Markdown dashboard for Jest
See #20
npm install -D jest-md-dashboardyarn add -D jest-md-dashboardpnpm add -D jest-md-dashboardAdd 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;| Name | Type | Default | Description |
|---|---|---|---|
title |
string |
"Test Dashboard" |
The title of a dashboard. It will be printed at the top of the markdown output. |
outputPath |
string |
test-dashboard.md |
The file path to output dashboard. If you want to output to stdout, specify -. |
permalinkBaseUrl |
string |
undefined |
Override 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.
permalinkBaseUrloption- (on GitHub Actions) environment variables
- (in git repository) repository config
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/
If jest runs on GitHub Actions, jest-md-dashboard refers to the the environment variables.
If jest runs in a git repository, jest-md-dashboard refers to the local repository config.
We appreciate your help!